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

Unified Diff: mojo/edk/system/local_data_pipe_impl.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/ipc_support_unittest.cc ('k') | mojo/edk/system/mapping_table.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/local_data_pipe_impl.cc
diff --git a/mojo/edk/system/local_data_pipe_impl.cc b/mojo/edk/system/local_data_pipe_impl.cc
index 1af0f92d00643ae2093ff867f4211d6a9e00b903..83194ca37924548e8e8cffc8ba18e5cd09f29402 100644
--- a/mojo/edk/system/local_data_pipe_impl.cc
+++ b/mojo/edk/system/local_data_pipe_impl.cc
@@ -16,7 +16,6 @@
#include <utility>
#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
#include "mojo/edk/system/channel.h"
#include "mojo/edk/system/configuration.h"
#include "mojo/edk/system/data_pipe.h"
@@ -24,6 +23,7 @@
#include "mojo/edk/system/message_in_transit_queue.h"
#include "mojo/edk/system/remote_consumer_data_pipe_impl.h"
#include "mojo/edk/system/remote_producer_data_pipe_impl.h"
+#include "mojo/edk/util/make_unique.h"
namespace mojo {
namespace system {
@@ -193,9 +193,10 @@ bool LocalDataPipeImpl::ProducerEndSerialize(
channel_endpoint_client(), 0);
// Note: Keep |*this| alive until the end of this method, to make things
// slightly easier on ourselves.
- scoped_ptr<DataPipeImpl> self(ReplaceImpl(make_scoped_ptr(
- new RemoteProducerDataPipeImpl(channel_endpoint.get(), std::move(buffer_),
- start_index_, current_num_bytes_))));
+ std::unique_ptr<DataPipeImpl> self(
+ ReplaceImpl(util::MakeUnique<RemoteProducerDataPipeImpl>(
+ channel_endpoint.get(), std::move(buffer_), start_index_,
+ current_num_bytes_)));
*actual_size = sizeof(SerializedDataPipeProducerDispatcher) +
channel->GetSerializedEndpointSize();
@@ -380,8 +381,9 @@ bool LocalDataPipeImpl::ConsumerEndSerialize(
channel_endpoint_client(), 0);
// Note: Keep |*this| alive until the end of this method, to make things
// slightly easier on ourselves.
- scoped_ptr<DataPipeImpl> self(ReplaceImpl(make_scoped_ptr(
- new RemoteConsumerDataPipeImpl(channel_endpoint.get(), old_num_bytes))));
+ std::unique_ptr<DataPipeImpl> self(
+ ReplaceImpl(util::MakeUnique<RemoteConsumerDataPipeImpl>(
+ channel_endpoint.get(), old_num_bytes)));
*actual_size = sizeof(SerializedDataPipeConsumerDispatcher) +
channel->GetSerializedEndpointSize();
« no previous file with comments | « mojo/edk/system/ipc_support_unittest.cc ('k') | mojo/edk/system/mapping_table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698