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

Side by Side Diff: mojo/edk/system/master_connection_manager.cc

Issue 1351293002: Convert remaining scoped_ptr -> std::unique_ptr in //mojo/edk (minus js). (Closed) Base URL: https://github.com/domokit/mojo.git@edk_unique_ptr_5
Patch Set: oops, forgot to fix android 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 unified diff | Download patch
« no previous file with comments | « mojo/edk/system/channel.cc ('k') | mojo/edk/system/raw_channel.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/edk/system/master_connection_manager.h" 5 #include "mojo/edk/system/master_connection_manager.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 bytes)); 191 bytes));
192 192
193 if (result == Result::SUCCESS_CONNECT_NEW_CONNECTION) { 193 if (result == Result::SUCCESS_CONNECT_NEW_CONNECTION) {
194 DCHECK_EQ(message_view.subtype(), 194 DCHECK_EQ(message_view.subtype(),
195 MessageInTransit::Subtype::CONNECTION_MANAGER_CONNECT); 195 MessageInTransit::Subtype::CONNECTION_MANAGER_CONNECT);
196 DCHECK(platform_handle.is_valid()); 196 DCHECK(platform_handle.is_valid());
197 embedder::ScopedPlatformHandleVectorPtr platform_handles( 197 embedder::ScopedPlatformHandleVectorPtr platform_handles(
198 new embedder::PlatformHandleVector()); 198 new embedder::PlatformHandleVector());
199 platform_handles->push_back(platform_handle.release()); 199 platform_handles->push_back(platform_handle.release());
200 response->SetTransportData(util::MakeUnique<TransportData>( 200 response->SetTransportData(util::MakeUnique<TransportData>(
201 platform_handles.Pass(), 201 std::move(platform_handles),
202 raw_channel_->GetSerializedPlatformHandleSize())); 202 raw_channel_->GetSerializedPlatformHandleSize()));
203 } else { 203 } else {
204 DCHECK(!platform_handle.is_valid()); 204 DCHECK(!platform_handle.is_valid());
205 } 205 }
206 206
207 if (!raw_channel_->WriteMessage(std::move(response))) { 207 if (!raw_channel_->WriteMessage(std::move(response))) {
208 LOG(ERROR) << "WriteMessage failed"; 208 LOG(ERROR) << "WriteMessage failed";
209 FatalError(); // WARNING: This destroys us. 209 FatalError(); // WARNING: This destroys us.
210 return; 210 return;
211 } 211 }
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 } 737 }
738 738
739 void MasterConnectionManager::AssertOnPrivateThread() const { 739 void MasterConnectionManager::AssertOnPrivateThread() const {
740 // This should only be called after |Init()| and before |Shutdown()|. 740 // This should only be called after |Init()| and before |Shutdown()|.
741 DCHECK(private_thread_.message_loop()); 741 DCHECK(private_thread_.message_loop());
742 DCHECK_EQ(base::MessageLoop::current(), private_thread_.message_loop()); 742 DCHECK_EQ(base::MessageLoop::current(), private_thread_.message_loop());
743 } 743 }
744 744
745 } // namespace system 745 } // namespace system
746 } // namespace mojo 746 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/channel.cc ('k') | mojo/edk/system/raw_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698