OLD | NEW |
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 "chromeos/dbus/dbus_thread_manager.h" | 5 #include "chromeos/dbus/dbus_thread_manager.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 GetShillDeviceClient()->Init(GetSystemBus()); | 215 GetShillDeviceClient()->Init(GetSystemBus()); |
216 GetShillIPConfigClient()->Init(GetSystemBus()); | 216 GetShillIPConfigClient()->Init(GetSystemBus()); |
217 GetShillManagerClient()->Init(GetSystemBus()); | 217 GetShillManagerClient()->Init(GetSystemBus()); |
218 GetShillServiceClient()->Init(GetSystemBus()); | 218 GetShillServiceClient()->Init(GetSystemBus()); |
219 GetShillProfileClient()->Init(GetSystemBus()); | 219 GetShillProfileClient()->Init(GetSystemBus()); |
220 GetShillThirdPartyVpnDriverClient()->Init(GetSystemBus()); | 220 GetShillThirdPartyVpnDriverClient()->Init(GetSystemBus()); |
221 GetSMSClient()->Init(GetSystemBus()); | 221 GetSMSClient()->Init(GetSystemBus()); |
222 GetSystemClockClient()->Init(GetSystemBus()); | 222 GetSystemClockClient()->Init(GetSystemBus()); |
223 GetUpdateEngineClient()->Init(GetSystemBus()); | 223 GetUpdateEngineClient()->Init(GetSystemBus()); |
224 | 224 |
225 // This must be called after the list of clients so they've each had a | |
226 // chance to register with their object g_dbus_thread_managers. | |
227 if (GetSystemBus()) | |
228 GetSystemBus()->GetManagedObjects(); | |
229 | |
230 client_bundle_->SetupDefaultEnvironment(); | 225 client_bundle_->SetupDefaultEnvironment(); |
231 } | 226 } |
232 | 227 |
233 bool DBusThreadManager::IsUsingStub(DBusClientBundle::DBusClientType client) { | 228 bool DBusThreadManager::IsUsingStub(DBusClientBundle::DBusClientType client) { |
234 return client_bundle_->IsUsingStub(client); | 229 return client_bundle_->IsUsingStub(client); |
235 } | 230 } |
236 | 231 |
237 // static | 232 // static |
238 void DBusThreadManager::Initialize() { | 233 void DBusThreadManager::Initialize() { |
239 // If we initialize DBusThreadManager twice we may also be shutting it down | 234 // If we initialize DBusThreadManager twice we may also be shutting it down |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 std::move(client); | 452 std::move(client); |
458 } | 453 } |
459 | 454 |
460 void DBusThreadManagerSetter::SetUpdateEngineClient( | 455 void DBusThreadManagerSetter::SetUpdateEngineClient( |
461 std::unique_ptr<UpdateEngineClient> client) { | 456 std::unique_ptr<UpdateEngineClient> client) { |
462 DBusThreadManager::Get()->client_bundle_->update_engine_client_ = | 457 DBusThreadManager::Get()->client_bundle_->update_engine_client_ = |
463 std::move(client); | 458 std::move(client); |
464 } | 459 } |
465 | 460 |
466 } // namespace chromeos | 461 } // namespace chromeos |
OLD | NEW |