Chromium Code Reviews| Index: webrtc/base/messagequeue.h |
| diff --git a/webrtc/base/messagequeue.h b/webrtc/base/messagequeue.h |
| index efc479cf2644243d8abff92dcfe414e43055d97b..0d6be50ca05bf4d2dcb7cb095ff7186226cb9527 100644 |
| --- a/webrtc/base/messagequeue.h |
| +++ b/webrtc/base/messagequeue.h |
| @@ -22,7 +22,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 +88,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. |
| @@ -174,8 +174,8 @@ class MessageQueue { |
| // init_queue and call DoInit() from their constructor to prevent races |
| // with the MessageQueueManager using the object while the vtable is still |
| // being created. |
| - explicit MessageQueue(SocketServer* ss = NULL, |
| - bool init_queue = true); |
| + MessageQueue(SocketServer* ss, bool init_queue); |
| + MessageQueue(std::unique_ptr<SocketServer> ss, bool init_queue); |
| // NOTE: SUBCLASSES OF MessageQueue THAT OVERRIDE Clear MUST CALL |
| // DoDestroy() IN THEIR DESTRUCTORS! This is required to avoid a data race |
| @@ -277,11 +277,11 @@ class MessageQueue { |
| private: |
| // 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_; |
| + // If caller pass socketserver with ownship. |
|
stefan-webrtc
2016/04/19 08:29:33
s/ownship/ownership
danilchap
2016/04/19 09:43:09
Done.
|
| + std::unique_ptr<SocketServer> own_ss_; |
| SharedExclusiveLock ss_lock_; |
| - RTC_DISALLOW_COPY_AND_ASSIGN(MessageQueue); |
| + RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(MessageQueue); |
| }; |
| } // namespace rtc |