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

Unified Diff: webrtc/base/messagequeue.h

Issue 2703613006: Revert of Use std::unique_ptr instead of rtc::scoped_refptr in AsyncInvoker. (Closed)
Patch Set: Created 3 years, 10 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/asyncinvoker-inl.h ('k') | no next file » | 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 3750eb7271943bd230f85ccb532e97e0a8e7d49a..429a56a8c1e3cd69f6dcafa1b19fbc90dfa51f03 100644
--- a/webrtc/base/messagequeue.h
+++ b/webrtc/base/messagequeue.h
@@ -17,7 +17,6 @@
#include <list>
#include <memory>
#include <queue>
-#include <utility>
#include <vector>
#include "webrtc/base/basictypes.h"
@@ -99,10 +98,9 @@
template <class T>
class ScopedMessageData : public MessageData {
public:
- explicit ScopedMessageData(std::unique_ptr<T> data)
- : data_(std::move(data)) {}
- const T& data() const { return *data_; }
- T& data() { return *data_; }
+ explicit ScopedMessageData(T* data) : data_(data) { }
+ const std::unique_ptr<T>& data() const { return data_; }
+ std::unique_ptr<T>& data() { return data_; }
private:
std::unique_ptr<T> data_;
« no previous file with comments | « webrtc/base/asyncinvoker-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698