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

Unified Diff: mojo/edk/system/master_connection_manager.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/mapping_table.cc ('k') | mojo/edk/system/message_in_transit.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 92572122c4d0d32f72aa9b965f07a8b40f2a1365..0804dc91dc0534614b7e1a2bc4f8981b94b67002 100644
--- a/mojo/edk/system/master_connection_manager.cc
+++ b/mojo/edk/system/master_connection_manager.cc
@@ -4,6 +4,8 @@
#include "mojo/edk/system/master_connection_manager.h"
+#include <memory>
+
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/location.h"
@@ -18,6 +20,7 @@
#include "mojo/edk/system/message_in_transit.h"
#include "mojo/edk/system/raw_channel.h"
#include "mojo/edk/system/transport_data.h"
+#include "mojo/edk/util/make_unique.h"
#include "mojo/public/cpp/system/macros.h"
namespace mojo {
@@ -193,9 +196,9 @@ void MasterConnectionManager::Helper::OnReadMessage(
embedder::ScopedPlatformHandleVectorPtr platform_handles(
new embedder::PlatformHandleVector());
platform_handles->push_back(platform_handle.release());
- response->SetTransportData(make_scoped_ptr(
- new TransportData(platform_handles.Pass(),
- raw_channel_->GetSerializedPlatformHandleSize())));
+ response->SetTransportData(util::MakeUnique<TransportData>(
+ platform_handles.Pass(),
+ raw_channel_->GetSerializedPlatformHandleSize()));
} else {
DCHECK(!platform_handle.is_valid());
}
@@ -554,7 +557,7 @@ ConnectionManager::Result MasterConnectionManager::ConnectImpl(
// The remaining cases all result in |it| being removed from
// |pending_connects_| and deleting |info|.
pending_connects_.erase(it);
- scoped_ptr<PendingConnectInfo> info_deleter(info);
+ std::unique_ptr<PendingConnectInfo> info_deleter(info);
// |remaining_connectee| should be the same as |process_identifier|.
ProcessIdentifier remaining_connectee;
@@ -672,8 +675,8 @@ void MasterConnectionManager::AddSlaveOnPrivateThread(
DCHECK(event);
AssertOnPrivateThread();
- scoped_ptr<Helper> helper(new Helper(this, slave_process_identifier,
- slave_info, platform_handle.Pass()));
+ std::unique_ptr<Helper> helper(new Helper(
+ this, slave_process_identifier, slave_info, platform_handle.Pass()));
helper->Init();
DCHECK(helpers_.find(slave_process_identifier) == helpers_.end());
« no previous file with comments | « mojo/edk/system/mapping_table.cc ('k') | mojo/edk/system/message_in_transit.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698