Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Unified Diff: webrtc/api/dtlsidentitystore.h

Issue 1920043002: Replace scoped_ptr with unique_ptr in webrtc/base/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « talk/app/webrtc/objc/RTCPeerConnectionInterface.mm ('k') | webrtc/api/dtlsidentitystore.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/dtlsidentitystore.h
diff --git a/webrtc/api/dtlsidentitystore.h b/webrtc/api/dtlsidentitystore.h
index af4229201cb55dbef084ad272b2bf557b217512f..5ded1f112b367308d84e26e7273405fec98ada2f 100644
--- a/webrtc/api/dtlsidentitystore.h
+++ b/webrtc/api/dtlsidentitystore.h
@@ -11,6 +11,7 @@
#ifndef WEBRTC_API_DTLSIDENTITYSTORE_H_
#define WEBRTC_API_DTLSIDENTITYSTORE_H_
+#include <memory>
#include <queue>
#include <string>
#include <utility>
@@ -19,7 +20,6 @@
#include "webrtc/base/messagequeue.h"
#include "webrtc/base/optional.h"
#include "webrtc/base/refcount.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/scoped_ref_ptr.h"
#include "webrtc/base/sslidentity.h"
#include "webrtc/base/thread.h"
@@ -39,9 +39,9 @@ class DtlsIdentityRequestObserver : public rtc::RefCountInterface {
// TODO(hbos): Unify the OnSuccess method once Chrome code is updated.
virtual void OnSuccess(const std::string& der_cert,
const std::string& der_private_key) = 0;
- // |identity| is a scoped_ptr because rtc::SSLIdentity is not copyable and the
+ // |identity| is a unique_ptr because rtc::SSLIdentity is not copyable and the
// client has to get the ownership of the object to make use of it.
- virtual void OnSuccess(rtc::scoped_ptr<rtc::SSLIdentity> identity) = 0;
+ virtual void OnSuccess(std::unique_ptr<rtc::SSLIdentity> identity) = 0;
protected:
virtual ~DtlsIdentityRequestObserver() {}
@@ -106,7 +106,7 @@ class DtlsIdentityStoreImpl : public DtlsIdentityStoreInterface,
rtc::KeyType key_type,
const rtc::scoped_refptr<DtlsIdentityRequestObserver>& observer);
void OnIdentityGenerated(rtc::KeyType key_type,
- rtc::scoped_ptr<rtc::SSLIdentity> identity);
+ std::unique_ptr<rtc::SSLIdentity> identity);
class WorkerTask;
typedef rtc::ScopedMessageData<DtlsIdentityStoreImpl::WorkerTask>
@@ -115,11 +115,11 @@ class DtlsIdentityStoreImpl : public DtlsIdentityStoreInterface,
// A key type-identity pair.
struct IdentityResult {
IdentityResult(rtc::KeyType key_type,
- rtc::scoped_ptr<rtc::SSLIdentity> identity)
+ std::unique_ptr<rtc::SSLIdentity> identity)
: key_type_(key_type), identity_(std::move(identity)) {}
rtc::KeyType key_type_;
- rtc::scoped_ptr<rtc::SSLIdentity> identity_;
+ std::unique_ptr<rtc::SSLIdentity> identity_;
};
typedef rtc::ScopedMessageData<IdentityResult> IdentityResultMessageData;
@@ -139,7 +139,7 @@ class DtlsIdentityStoreImpl : public DtlsIdentityStoreInterface,
std::queue<rtc::scoped_refptr<DtlsIdentityRequestObserver>>
request_observers_;
size_t gen_in_progress_counts_;
- rtc::scoped_ptr<rtc::SSLIdentity> free_identity_;
+ std::unique_ptr<rtc::SSLIdentity> free_identity_;
};
// One RequestInfo per KeyType. Only touch on the |signaling_thread_|.
« no previous file with comments | « talk/app/webrtc/objc/RTCPeerConnectionInterface.mm ('k') | webrtc/api/dtlsidentitystore.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698