Replace scoped_ptr with unique_ptr in webrtc/base/
This propagated into various other places. Also had to #include headers that
were implicitly pulled by "scoped_ptr.h".
BUG=webrtc:5520
Review URL: https://codereview.webrtc.org/1920043002
Cr-Commit-Position: refs/heads/master@{#12501}
diff --git a/webrtc/base/messagequeue.h b/webrtc/base/messagequeue.h
index efc479c..d323283 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 @@
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 @@
// 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);