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

Unified Diff: mojo/edk/system/slave_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/remote_producer_data_pipe_impl.cc ('k') | mojo/edk/system/test_channel_endpoint_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/slave_connection_manager.cc
diff --git a/mojo/edk/system/slave_connection_manager.cc b/mojo/edk/system/slave_connection_manager.cc
index 1d9d590008cf2668496877168b909553c782062b..58b164d1fe1c9fba2491a08e456ad0bebf53027d 100644
--- a/mojo/edk/system/slave_connection_manager.cc
+++ b/mojo/edk/system/slave_connection_manager.cc
@@ -11,6 +11,7 @@
#include "base/message_loop/message_loop.h"
#include "mojo/edk/system/connection_manager_messages.h"
#include "mojo/edk/system/message_in_transit.h"
+#include "mojo/edk/util/make_unique.h"
namespace mojo {
namespace system {
@@ -160,10 +161,10 @@ void SlaveConnectionManager::AllowConnectOnPrivateThread(
DVLOG(1) << "Sending AllowConnect: connection ID "
<< connection_id.ToString();
- if (!raw_channel_->WriteMessage(make_scoped_ptr(new MessageInTransit(
+ if (!raw_channel_->WriteMessage(util::MakeUnique<MessageInTransit>(
MessageInTransit::Type::CONNECTION_MANAGER,
MessageInTransit::Subtype::CONNECTION_MANAGER_ALLOW_CONNECT,
- sizeof(connection_id), &connection_id)))) {
+ sizeof(connection_id), &connection_id))) {
// Don't tear things down; possibly we'll still read some messages.
*result = Result::FAILURE;
event_.Signal();
@@ -185,10 +186,10 @@ void SlaveConnectionManager::CancelConnectOnPrivateThread(
DVLOG(1) << "Sending CancelConnect: connection ID "
<< connection_id.ToString();
- if (!raw_channel_->WriteMessage(make_scoped_ptr(new MessageInTransit(
+ if (!raw_channel_->WriteMessage(util::MakeUnique<MessageInTransit>(
MessageInTransit::Type::CONNECTION_MANAGER,
MessageInTransit::Subtype::CONNECTION_MANAGER_CANCEL_CONNECT,
- sizeof(connection_id), &connection_id)))) {
+ sizeof(connection_id), &connection_id))) {
// Don't tear things down; possibly we'll still read some messages.
*result = Result::FAILURE;
event_.Signal();
@@ -212,10 +213,10 @@ void SlaveConnectionManager::ConnectOnPrivateThread(
DCHECK_EQ(awaiting_ack_type_, NOT_AWAITING_ACK);
DVLOG(1) << "Sending Connect: connection ID " << connection_id.ToString();
- if (!raw_channel_->WriteMessage(make_scoped_ptr(new MessageInTransit(
+ if (!raw_channel_->WriteMessage(util::MakeUnique<MessageInTransit>(
MessageInTransit::Type::CONNECTION_MANAGER,
MessageInTransit::Subtype::CONNECTION_MANAGER_CONNECT,
- sizeof(connection_id), &connection_id)))) {
+ sizeof(connection_id), &connection_id))) {
// Don't tear things down; possibly we'll still read some messages.
*result = Result::FAILURE;
platform_handle->reset();
« no previous file with comments | « mojo/edk/system/remote_producer_data_pipe_impl.cc ('k') | mojo/edk/system/test_channel_endpoint_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698