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

Unified Diff: mojo/edk/system/message_pipe.cc

Issue 1350183002: EDK: More scoped_ptr -> std::unique_ptr conversions. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: gah 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/message_in_transit.cc ('k') | mojo/edk/system/multiprocess_message_pipe_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/message_pipe.cc
diff --git a/mojo/edk/system/message_pipe.cc b/mojo/edk/system/message_pipe.cc
index e7db1a0a77516fcf805e71672f8a4a3aaddb65ff..0f15698a9c7e8328025ddbdd8a176e849355b856 100644
--- a/mojo/edk/system/message_pipe.cc
+++ b/mojo/edk/system/message_pipe.cc
@@ -4,6 +4,8 @@
#include "mojo/edk/system/message_pipe.h"
+#include <memory>
+
#include "base/logging.h"
#include "mojo/edk/system/channel.h"
#include "mojo/edk/system/channel_endpoint.h"
@@ -367,7 +369,7 @@ MojoResult MessagePipe::AttachTransportsNoLock(
// Clone the dispatchers and attach them to the message. (This must be done as
// a separate loop, since we want to leave the dispatchers alone on failure.)
- scoped_ptr<DispatcherVector> dispatchers(new DispatcherVector());
+ std::unique_ptr<DispatcherVector> dispatchers(new DispatcherVector());
dispatchers->reserve(transports->size());
for (size_t i = 0; i < transports->size(); i++) {
if ((*transports)[i].is_valid()) {
@@ -378,7 +380,7 @@ MojoResult MessagePipe::AttachTransportsNoLock(
dispatchers->push_back(nullptr);
}
}
- message->SetDispatchers(dispatchers.Pass());
+ message->SetDispatchers(std::move(dispatchers));
return MOJO_RESULT_OK;
}
« no previous file with comments | « mojo/edk/system/message_in_transit.cc ('k') | mojo/edk/system/multiprocess_message_pipe_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698