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

Unified Diff: mojo/edk/system/message_in_transit_queue.h

Issue 1353683005: EDK: Convert remaining scoped_ptr -> std::unique_ptr in //mojo/edk/system. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 3 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 | « mojo/edk/system/master_connection_manager.cc ('k') | mojo/edk/system/message_in_transit_test_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/message_in_transit_queue.h
diff --git a/mojo/edk/system/message_in_transit_queue.h b/mojo/edk/system/message_in_transit_queue.h
index f7464bd6272476b024c87fe5d95ffd52d27d94ef..e231477b8cbf3b24700c06de166f19fda4ed5818 100644
--- a/mojo/edk/system/message_in_transit_queue.h
+++ b/mojo/edk/system/message_in_transit_queue.h
@@ -6,8 +6,8 @@
#define MOJO_EDK_SYSTEM_MESSAGE_IN_TRANSIT_QUEUE_H_
#include <deque>
+#include <memory>
-#include "base/memory/scoped_ptr.h"
#include "mojo/edk/system/message_in_transit.h"
#include "mojo/edk/system/system_impl_export.h"
#include "mojo/public/cpp/system/macros.h"
@@ -25,14 +25,14 @@ class MOJO_SYSTEM_IMPL_EXPORT MessageInTransitQueue {
bool IsEmpty() const { return queue_.empty(); }
size_t Size() const { return queue_.size(); }
- void AddMessage(scoped_ptr<MessageInTransit> message) {
+ void AddMessage(std::unique_ptr<MessageInTransit> message) {
queue_.push_back(message.release());
}
- scoped_ptr<MessageInTransit> GetMessage() {
+ std::unique_ptr<MessageInTransit> GetMessage() {
MessageInTransit* rv = queue_.front();
queue_.pop_front();
- return make_scoped_ptr(rv);
+ return std::unique_ptr<MessageInTransit>(rv);
}
const MessageInTransit* PeekMessage() const { return queue_.front(); }
@@ -50,7 +50,7 @@ class MOJO_SYSTEM_IMPL_EXPORT MessageInTransitQueue {
private:
// TODO(vtl): When C++11 is available, switch this to a deque of
- // |scoped_ptr|/|unique_ptr|s.
+ // |unique_ptr|s.
std::deque<MessageInTransit*> queue_;
MOJO_DISALLOW_COPY_AND_ASSIGN(MessageInTransitQueue);
« no previous file with comments | « mojo/edk/system/master_connection_manager.cc ('k') | mojo/edk/system/message_in_transit_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698