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

Unified Diff: webrtc/base/messagequeue.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 | « webrtc/base/messagehandler.h ('k') | webrtc/base/multipart_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/messagequeue.h
diff --git a/webrtc/base/messagequeue.h b/webrtc/base/messagequeue.h
index efc479cf2644243d8abff92dcfe414e43055d97b..d323283741cac23514799c7a15cc77b50e094dcd 100644
--- a/webrtc/base/messagequeue.h
+++ b/webrtc/base/messagequeue.h
@@ -15,6 +15,7 @@
#include <algorithm>
#include <list>
+#include <memory>
#include <queue>
#include <vector>
@@ -22,7 +23,6 @@
#include "webrtc/base/constructormagic.h"
#include "webrtc/base/criticalsection.h"
#include "webrtc/base/messagehandler.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/scoped_ref_ptr.h"
#include "webrtc/base/sharedexclusivelock.h"
#include "webrtc/base/sigslot.h"
@@ -89,10 +89,11 @@ template <class T>
class ScopedMessageData : public MessageData {
public:
explicit ScopedMessageData(T* data) : data_(data) { }
- const scoped_ptr<T>& data() const { return data_; }
- scoped_ptr<T>& data() { return data_; }
+ const std::unique_ptr<T>& data() const { return data_; }
+ std::unique_ptr<T>& data() { return data_; }
+
private:
- scoped_ptr<T> data_;
+ std::unique_ptr<T> data_;
};
// Like ScopedMessageData, but for reference counted pointers.
@@ -278,7 +279,7 @@ class MessageQueue {
// The SocketServer is not owned by MessageQueue.
SocketServer* ss_ GUARDED_BY(ss_lock_);
// If a server isn't supplied in the constructor, use this one.
- scoped_ptr<SocketServer> default_ss_;
+ std::unique_ptr<SocketServer> default_ss_;
SharedExclusiveLock ss_lock_;
RTC_DISALLOW_COPY_AND_ASSIGN(MessageQueue);
« no previous file with comments | « webrtc/base/messagehandler.h ('k') | webrtc/base/multipart_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698