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

Side by Side Diff: device/bluetooth/bluetooth_socket_chromeos.cc

Issue 575503003: Remove implicit conversions from scoped_refptr to T* in device (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | « device/bluetooth/bluetooth_chromeos_unittest.cc ('k') | device/nfc/nfc_chromeos_unittest.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "device/bluetooth/bluetooth_socket_chromeos.h" 5 #include "device/bluetooth/bluetooth_socket_chromeos.h"
6 6
7 #include <queue> 7 #include <queue>
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 238
239 // Create the service provider for the profile object. 239 // Create the service provider for the profile object.
240 dbus::Bus* system_bus = DBusThreadManager::Get()->GetSystemBus(); 240 dbus::Bus* system_bus = DBusThreadManager::Get()->GetSystemBus();
241 profile_.reset(BluetoothProfileServiceProvider::Create( 241 profile_.reset(BluetoothProfileServiceProvider::Create(
242 system_bus, object_path_, this)); 242 system_bus, object_path_, this));
243 DCHECK(profile_.get()); 243 DCHECK(profile_.get());
244 244
245 // Before reaching out to the Bluetooth Daemon to register a listening socket, 245 // Before reaching out to the Bluetooth Daemon to register a listening socket,
246 // make sure it's actually running. If not, report success and carry on; 246 // make sure it's actually running. If not, report success and carry on;
247 // the profile will be registered when the daemon becomes available. 247 // the profile will be registered when the daemon becomes available.
248 if (adapter_ && !adapter_->IsPresent()) { 248 if (adapter_.get() && !adapter_->IsPresent()) {
249 VLOG(1) << object_path_.value() << ": Delaying profile registration."; 249 VLOG(1) << object_path_.value() << ": Delaying profile registration.";
250 success_callback.Run(); 250 success_callback.Run();
251 return; 251 return;
252 } 252 }
253 253
254 VLOG(1) << object_path_.value() << ": Registering profile."; 254 VLOG(1) << object_path_.value() << ": Registering profile.";
255 DBusThreadManager::Get()->GetBluetoothProfileManagerClient()-> 255 DBusThreadManager::Get()->GetBluetoothProfileManagerClient()->
256 RegisterProfile( 256 RegisterProfile(
257 object_path_, 257 object_path_,
258 uuid_.canonical_value(), 258 uuid_.canonical_value(),
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 // It's okay if the profile doesn't exist, it means we haven't registered it 584 // It's okay if the profile doesn't exist, it means we haven't registered it
585 // yet. 585 // yet.
586 if (error_name == bluetooth_profile_manager::kErrorDoesNotExist) 586 if (error_name == bluetooth_profile_manager::kErrorDoesNotExist)
587 return; 587 return;
588 588
589 LOG(WARNING) << object_path_.value() << ": Failed to unregister profile: " 589 LOG(WARNING) << object_path_.value() << ": Failed to unregister profile: "
590 << error_name << ": " << error_message; 590 << error_name << ": " << error_message;
591 } 591 }
592 592
593 } // namespace chromeos 593 } // namespace chromeos
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_chromeos_unittest.cc ('k') | device/nfc/nfc_chromeos_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698