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

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

Issue 2239123002: dbus: Make Bus::GetManagedObjects skip unavailable services. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove call to WaitForServiceToBeAvailable Created 4 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 | « dbus/object_manager.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 client_bundle_->bluetooth_gatt_characteristic_client()->Init(GetSystemBus()); 188 client_bundle_->bluetooth_gatt_characteristic_client()->Init(GetSystemBus());
189 client_bundle_->bluetooth_gatt_descriptor_client()->Init(GetSystemBus()); 189 client_bundle_->bluetooth_gatt_descriptor_client()->Init(GetSystemBus());
190 client_bundle_->bluetooth_gatt_manager_client()->Init(GetSystemBus()); 190 client_bundle_->bluetooth_gatt_manager_client()->Init(GetSystemBus());
191 client_bundle_->bluetooth_gatt_service_client()->Init(GetSystemBus()); 191 client_bundle_->bluetooth_gatt_service_client()->Init(GetSystemBus());
192 client_bundle_->bluetooth_input_client()->Init(GetSystemBus()); 192 client_bundle_->bluetooth_input_client()->Init(GetSystemBus());
193 client_bundle_->bluetooth_le_advertising_manager_client()->Init( 193 client_bundle_->bluetooth_le_advertising_manager_client()->Init(
194 GetSystemBus()); 194 GetSystemBus());
195 client_bundle_->bluetooth_media_client()->Init(GetSystemBus()); 195 client_bundle_->bluetooth_media_client()->Init(GetSystemBus());
196 client_bundle_->bluetooth_media_transport_client()->Init(GetSystemBus()); 196 client_bundle_->bluetooth_media_transport_client()->Init(GetSystemBus());
197 client_bundle_->bluetooth_profile_manager_client()->Init(GetSystemBus()); 197 client_bundle_->bluetooth_profile_manager_client()->Init(GetSystemBus());
198
199 // This must be called after the list of clients so they've each had a
200 // chance to register with their object g_dbus_thread_managers.
201 if (GetSystemBus())
202 GetSystemBus()->GetManagedObjects();
203 } 198 }
204 199
205 // static 200 // static
206 void BluezDBusManager::Initialize(dbus::Bus* bus, bool use_dbus_stub) { 201 void BluezDBusManager::Initialize(dbus::Bus* bus, bool use_dbus_stub) {
207 // If we initialize BluezDBusManager twice we may also be shutting it down 202 // If we initialize BluezDBusManager twice we may also be shutting it down
208 // early; do not allow that. 203 // early; do not allow that.
209 if (g_using_bluez_dbus_manager_for_testing) 204 if (g_using_bluez_dbus_manager_for_testing)
210 return; 205 return;
211 206
212 CHECK(!g_bluez_dbus_manager); 207 CHECK(!g_bluez_dbus_manager);
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 ->client_bundle_->bluetooth_media_transport_client_ = std::move(client); 320 ->client_bundle_->bluetooth_media_transport_client_ = std::move(client);
326 } 321 }
327 322
328 void BluezDBusManagerSetter::SetBluetoothProfileManagerClient( 323 void BluezDBusManagerSetter::SetBluetoothProfileManagerClient(
329 std::unique_ptr<BluetoothProfileManagerClient> client) { 324 std::unique_ptr<BluetoothProfileManagerClient> client) {
330 bluez::BluezDBusManager::Get() 325 bluez::BluezDBusManager::Get()
331 ->client_bundle_->bluetooth_profile_manager_client_ = std::move(client); 326 ->client_bundle_->bluetooth_profile_manager_client_ = std::move(client);
332 } 327 }
333 328
334 } // namespace bluez 329 } // namespace bluez
OLDNEW
« no previous file with comments | « dbus/object_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698