| 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 GetShillDeviceClient()->Init(GetSystemBus()); | 209 GetShillDeviceClient()->Init(GetSystemBus()); |
| 210 GetShillIPConfigClient()->Init(GetSystemBus()); | 210 GetShillIPConfigClient()->Init(GetSystemBus()); |
| 211 GetShillManagerClient()->Init(GetSystemBus()); | 211 GetShillManagerClient()->Init(GetSystemBus()); |
| 212 GetShillServiceClient()->Init(GetSystemBus()); | 212 GetShillServiceClient()->Init(GetSystemBus()); |
| 213 GetShillProfileClient()->Init(GetSystemBus()); | 213 GetShillProfileClient()->Init(GetSystemBus()); |
| 214 GetShillThirdPartyVpnDriverClient()->Init(GetSystemBus()); | 214 GetShillThirdPartyVpnDriverClient()->Init(GetSystemBus()); |
| 215 GetSMSClient()->Init(GetSystemBus()); | 215 GetSMSClient()->Init(GetSystemBus()); |
| 216 GetSystemClockClient()->Init(GetSystemBus()); | 216 GetSystemClockClient()->Init(GetSystemBus()); |
| 217 GetUpdateEngineClient()->Init(GetSystemBus()); | 217 GetUpdateEngineClient()->Init(GetSystemBus()); |
| 218 | 218 |
| 219 // This must be called after the list of clients so they've each had a | |
| 220 // chance to register with their object g_dbus_thread_managers. | |
| 221 if (GetSystemBus()) | |
| 222 GetSystemBus()->GetManagedObjects(); | |
| 223 | |
| 224 client_bundle_->SetupDefaultEnvironment(); | 219 client_bundle_->SetupDefaultEnvironment(); |
| 225 } | 220 } |
| 226 | 221 |
| 227 bool DBusThreadManager::IsUsingStub(DBusClientBundle::DBusClientType client) { | 222 bool DBusThreadManager::IsUsingStub(DBusClientBundle::DBusClientType client) { |
| 228 return client_bundle_->IsUsingStub(client); | 223 return client_bundle_->IsUsingStub(client); |
| 229 } | 224 } |
| 230 | 225 |
| 231 // static | 226 // static |
| 232 void DBusThreadManager::Initialize() { | 227 void DBusThreadManager::Initialize() { |
| 233 // If we initialize DBusThreadManager twice we may also be shutting it down | 228 // If we initialize DBusThreadManager twice we may also be shutting it down |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 std::move(client); | 440 std::move(client); |
| 446 } | 441 } |
| 447 | 442 |
| 448 void DBusThreadManagerSetter::SetUpdateEngineClient( | 443 void DBusThreadManagerSetter::SetUpdateEngineClient( |
| 449 std::unique_ptr<UpdateEngineClient> client) { | 444 std::unique_ptr<UpdateEngineClient> client) { |
| 450 DBusThreadManager::Get()->client_bundle_->update_engine_client_ = | 445 DBusThreadManager::Get()->client_bundle_->update_engine_client_ = |
| 451 std::move(client); | 446 std::move(client); |
| 452 } | 447 } |
| 453 | 448 |
| 454 } // namespace chromeos | 449 } // namespace chromeos |
| OLD | NEW |