| 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" |
| 11 #include "base/sys_info.h" | 11 #include "base/sys_info.h" |
| 12 #include "base/threading/thread.h" | 12 #include "base/threading/thread.h" |
| 13 #include "chromeos/chromeos_switches.h" | 13 #include "chromeos/chromeos_switches.h" |
| 14 #include "chromeos/dbus/arc_obb_mounter_client.h" | 14 #include "chromeos/dbus/arc_obb_mounter_client.h" |
| 15 #include "chromeos/dbus/auth_policy_client.h" | 15 #include "chromeos/dbus/auth_policy_client.h" |
| 16 #include "chromeos/dbus/biod/biod_client.h" | 16 #include "chromeos/dbus/biod/biod_client.h" |
| 17 #include "chromeos/dbus/cras_audio_client.h" | 17 #include "chromeos/dbus/cras_audio_client.h" |
| 18 #include "chromeos/dbus/cros_disks_client.h" | 18 #include "chromeos/dbus/cros_disks_client.h" |
| 19 #include "chromeos/dbus/cryptohome_client.h" | 19 #include "chromeos/dbus/cryptohome_client.h" |
| 20 #include "chromeos/dbus/dbus_client.h" | 20 #include "chromeos/dbus/dbus_client.h" |
| 21 #include "chromeos/dbus/dbus_clients_browser.h" | 21 #include "chromeos/dbus/dbus_clients_browser.h" |
| 22 #include "chromeos/dbus/dbus_clients_common.h" | 22 #include "chromeos/dbus/dbus_clients_common.h" |
| 23 #include "chromeos/dbus/debug_daemon_client.h" | 23 #include "chromeos/dbus/debug_daemon_client.h" |
| 24 #include "chromeos/dbus/easy_unlock_client.h" | 24 #include "chromeos/dbus/easy_unlock_client.h" |
| 25 #include "chromeos/dbus/gsm_sms_client.h" | 25 #include "chromeos/dbus/gsm_sms_client.h" |
| 26 #include "chromeos/dbus/image_burner_client.h" | 26 #include "chromeos/dbus/image_burner_client.h" |
| 27 #include "chromeos/dbus/image_loader_client.h" | 27 #include "chromeos/dbus/image_loader_client.h" |
| 28 #include "chromeos/dbus/lorgnette_manager_client.h" | 28 #include "chromeos/dbus/lorgnette_manager_client.h" |
| 29 #include "chromeos/dbus/media_analytics_client.h" |
| 29 #include "chromeos/dbus/modem_messaging_client.h" | 30 #include "chromeos/dbus/modem_messaging_client.h" |
| 30 #include "chromeos/dbus/permission_broker_client.h" | 31 #include "chromeos/dbus/permission_broker_client.h" |
| 31 #include "chromeos/dbus/power_manager_client.h" | 32 #include "chromeos/dbus/power_manager_client.h" |
| 32 #include "chromeos/dbus/session_manager_client.h" | 33 #include "chromeos/dbus/session_manager_client.h" |
| 33 #include "chromeos/dbus/shill_device_client.h" | 34 #include "chromeos/dbus/shill_device_client.h" |
| 34 #include "chromeos/dbus/shill_ipconfig_client.h" | 35 #include "chromeos/dbus/shill_ipconfig_client.h" |
| 35 #include "chromeos/dbus/shill_manager_client.h" | 36 #include "chromeos/dbus/shill_manager_client.h" |
| 36 #include "chromeos/dbus/shill_profile_client.h" | 37 #include "chromeos/dbus/shill_profile_client.h" |
| 37 #include "chromeos/dbus/shill_service_client.h" | 38 #include "chromeos/dbus/shill_service_client.h" |
| 38 #include "chromeos/dbus/shill_third_party_vpn_driver_client.h" | 39 #include "chromeos/dbus/shill_third_party_vpn_driver_client.h" |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 ImageBurnerClient* DBusThreadManager::GetImageBurnerClient() { | 182 ImageBurnerClient* DBusThreadManager::GetImageBurnerClient() { |
| 182 return clients_browser_ ? clients_browser_->image_burner_client_.get() | 183 return clients_browser_ ? clients_browser_->image_burner_client_.get() |
| 183 : nullptr; | 184 : nullptr; |
| 184 } | 185 } |
| 185 | 186 |
| 186 ImageLoaderClient* DBusThreadManager::GetImageLoaderClient() { | 187 ImageLoaderClient* DBusThreadManager::GetImageLoaderClient() { |
| 187 return clients_browser_ ? clients_browser_->image_loader_client_.get() | 188 return clients_browser_ ? clients_browser_->image_loader_client_.get() |
| 188 : nullptr; | 189 : nullptr; |
| 189 } | 190 } |
| 190 | 191 |
| 192 MediaAnalyticsClient* DBusThreadManager::GetMediaAnalyticsClient() { |
| 193 return clients_browser_ ? clients_browser_->media_analytics_client_.get() |
| 194 : nullptr; |
| 195 } |
| 196 |
| 191 ModemMessagingClient* DBusThreadManager::GetModemMessagingClient() { | 197 ModemMessagingClient* DBusThreadManager::GetModemMessagingClient() { |
| 192 return clients_common_->modem_messaging_client_.get(); | 198 return clients_common_->modem_messaging_client_.get(); |
| 193 } | 199 } |
| 194 | 200 |
| 195 PermissionBrokerClient* DBusThreadManager::GetPermissionBrokerClient() { | 201 PermissionBrokerClient* DBusThreadManager::GetPermissionBrokerClient() { |
| 196 return clients_common_->permission_broker_client_.get(); | 202 return clients_common_->permission_broker_client_.get(); |
| 197 } | 203 } |
| 198 | 204 |
| 199 PowerManagerClient* DBusThreadManager::GetPowerManagerClient() { | 205 PowerManagerClient* DBusThreadManager::GetPowerManagerClient() { |
| 200 return clients_common_->power_manager_client_.get(); | 206 return clients_common_->power_manager_client_.get(); |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 std::move(client); | 403 std::move(client); |
| 398 } | 404 } |
| 399 | 405 |
| 400 void DBusThreadManagerSetter::SetUpdateEngineClient( | 406 void DBusThreadManagerSetter::SetUpdateEngineClient( |
| 401 std::unique_ptr<UpdateEngineClient> client) { | 407 std::unique_ptr<UpdateEngineClient> client) { |
| 402 DBusThreadManager::Get()->clients_common_->update_engine_client_ = | 408 DBusThreadManager::Get()->clients_common_->update_engine_client_ = |
| 403 std::move(client); | 409 std::move(client); |
| 404 } | 410 } |
| 405 | 411 |
| 406 } // namespace chromeos | 412 } // namespace chromeos |
| OLD | NEW |