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

Side by Side Diff: device/bluetooth/dbus/bluez_dbus_manager.cc

Issue 2561963002: base: Remove the string logging from CHECK(). (Closed)
Patch Set: checkstring: rebase Created 4 years 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/dbus/bluez_dbus_manager.h" 5 #include "device/bluetooth/dbus/bluez_dbus_manager.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 #endif 48 #endif
49 49
50 if (!should_check_object_manager || use_dbus_fakes) { 50 if (!should_check_object_manager || use_dbus_fakes) {
51 client_bundle_.reset(new BluetoothDBusClientBundle(use_dbus_fakes)); 51 client_bundle_.reset(new BluetoothDBusClientBundle(use_dbus_fakes));
52 InitializeClients(); 52 InitializeClients();
53 object_manager_supported_ = true; 53 object_manager_supported_ = true;
54 object_manager_support_known_ = true; 54 object_manager_support_known_ = true;
55 return; 55 return;
56 } 56 }
57 57
58 CHECK(GetSystemBus()) << "Can't initialize real clients without DBus."; 58 // Can't initialize real clients without DBus.
59 CHECK(GetSystemBus());
59 dbus::MethodCall method_call(dbus::kObjectManagerInterface, 60 dbus::MethodCall method_call(dbus::kObjectManagerInterface,
60 dbus::kObjectManagerGetManagedObjects); 61 dbus::kObjectManagerGetManagedObjects);
61 GetSystemBus() 62 GetSystemBus()
62 ->GetObjectProxy( 63 ->GetObjectProxy(
63 bluetooth_object_manager::kBluetoothObjectManagerServiceName, 64 bluetooth_object_manager::kBluetoothObjectManagerServiceName,
64 dbus::ObjectPath( 65 dbus::ObjectPath(
65 bluetooth_object_manager::kBluetoothObjectManagerServicePath)) 66 bluetooth_object_manager::kBluetoothObjectManagerServicePath))
66 ->CallMethodWithErrorCallback( 67 ->CallMethodWithErrorCallback(
67 &method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, 68 &method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
68 base::Bind(&BluezDBusManager::OnObjectManagerSupported, 69 base::Bind(&BluezDBusManager::OnObjectManagerSupported,
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 CHECK(g_bluez_dbus_manager); 237 CHECK(g_bluez_dbus_manager);
237 BluezDBusManager* dbus_manager = g_bluez_dbus_manager; 238 BluezDBusManager* dbus_manager = g_bluez_dbus_manager;
238 g_bluez_dbus_manager = nullptr; 239 g_bluez_dbus_manager = nullptr;
239 g_using_bluez_dbus_manager_for_testing = false; 240 g_using_bluez_dbus_manager_for_testing = false;
240 delete dbus_manager; 241 delete dbus_manager;
241 VLOG(1) << "BluezDBusManager Shutdown completed"; 242 VLOG(1) << "BluezDBusManager Shutdown completed";
242 } 243 }
243 244
244 // static 245 // static
245 BluezDBusManager* bluez::BluezDBusManager::Get() { 246 BluezDBusManager* bluez::BluezDBusManager::Get() {
246 CHECK(g_bluez_dbus_manager) 247 // bluez::BluezDBusManager::Get() called before Initialize()
247 << "bluez::BluezDBusManager::Get() called before Initialize()"; 248 CHECK(g_bluez_dbus_manager);
248 return g_bluez_dbus_manager; 249 return g_bluez_dbus_manager;
249 } 250 }
250 251
251 BluezDBusManagerSetter::BluezDBusManagerSetter() {} 252 BluezDBusManagerSetter::BluezDBusManagerSetter() {}
252 253
253 BluezDBusManagerSetter::~BluezDBusManagerSetter() {} 254 BluezDBusManagerSetter::~BluezDBusManagerSetter() {}
254 255
255 void BluezDBusManagerSetter::SetBluetoothAdapterClient( 256 void BluezDBusManagerSetter::SetBluetoothAdapterClient(
256 std::unique_ptr<BluetoothAdapterClient> client) { 257 std::unique_ptr<BluetoothAdapterClient> client) {
257 bluez::BluezDBusManager::Get()->client_bundle_->bluetooth_adapter_client_ = 258 bluez::BluezDBusManager::Get()->client_bundle_->bluetooth_adapter_client_ =
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 ->client_bundle_->bluetooth_media_transport_client_ = std::move(client); 321 ->client_bundle_->bluetooth_media_transport_client_ = std::move(client);
321 } 322 }
322 323
323 void BluezDBusManagerSetter::SetBluetoothProfileManagerClient( 324 void BluezDBusManagerSetter::SetBluetoothProfileManagerClient(
324 std::unique_ptr<BluetoothProfileManagerClient> client) { 325 std::unique_ptr<BluetoothProfileManagerClient> client) {
325 bluez::BluezDBusManager::Get() 326 bluez::BluezDBusManager::Get()
326 ->client_bundle_->bluetooth_profile_manager_client_ = std::move(client); 327 ->client_bundle_->bluetooth_profile_manager_client_ = std::move(client);
327 } 328 }
328 329
329 } // namespace bluez 330 } // namespace bluez
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698