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

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

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/local_message_pipe_endpoint.cc ('k') | mojo/edk/system/message_in_transit_queue.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/master_connection_manager.cc
diff --git a/mojo/edk/system/master_connection_manager.cc b/mojo/edk/system/master_connection_manager.cc
index c517a5f282a3cf0e1144c08ea3f5038f3ff82509..f9d3ac24e484e12a821cb6541017ad5e2abec08d 100644
--- a/mojo/edk/system/master_connection_manager.cc
+++ b/mojo/edk/system/master_connection_manager.cc
@@ -5,6 +5,7 @@
#include "mojo/edk/system/master_connection_manager.h"
#include <memory>
+#include <utility>
#include "base/bind.h"
#include "base/bind_helpers.h"
@@ -184,7 +185,7 @@ void MasterConnectionManager::Helper::OnReadMessage(
return;
}
- scoped_ptr<MessageInTransit> response(new MessageInTransit(
+ std::unique_ptr<MessageInTransit> response(new MessageInTransit(
MessageInTransit::Type::CONNECTION_MANAGER_ACK,
ConnectionManagerResultToMessageInTransitSubtype(result), num_bytes,
bytes));
@@ -203,7 +204,7 @@ void MasterConnectionManager::Helper::OnReadMessage(
DCHECK(!platform_handle.is_valid());
}
- if (!raw_channel_->WriteMessage(response.Pass())) {
+ if (!raw_channel_->WriteMessage(std::move(response))) {
LOG(ERROR) << "WriteMessage failed";
FatalError(); // WARNING: This destroys us.
return;
« no previous file with comments | « mojo/edk/system/local_message_pipe_endpoint.cc ('k') | mojo/edk/system/message_in_transit_queue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698