| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_client_bundle.h" | 5 #include "chromeos/dbus/dbus_client_bundle.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 #include "chromeos/dbus/fake_bluetooth_media_client.h" | 37 #include "chromeos/dbus/fake_bluetooth_media_client.h" |
| 38 #include "chromeos/dbus/fake_bluetooth_media_transport_client.h" | 38 #include "chromeos/dbus/fake_bluetooth_media_transport_client.h" |
| 39 #include "chromeos/dbus/fake_bluetooth_profile_manager_client.h" | 39 #include "chromeos/dbus/fake_bluetooth_profile_manager_client.h" |
| 40 #include "chromeos/dbus/fake_cras_audio_client.h" | 40 #include "chromeos/dbus/fake_cras_audio_client.h" |
| 41 #include "chromeos/dbus/fake_cryptohome_client.h" | 41 #include "chromeos/dbus/fake_cryptohome_client.h" |
| 42 #include "chromeos/dbus/fake_debug_daemon_client.h" | 42 #include "chromeos/dbus/fake_debug_daemon_client.h" |
| 43 #include "chromeos/dbus/fake_easy_unlock_client.h" | 43 #include "chromeos/dbus/fake_easy_unlock_client.h" |
| 44 #include "chromeos/dbus/fake_gsm_sms_client.h" | 44 #include "chromeos/dbus/fake_gsm_sms_client.h" |
| 45 #include "chromeos/dbus/fake_image_burner_client.h" | 45 #include "chromeos/dbus/fake_image_burner_client.h" |
| 46 #include "chromeos/dbus/fake_introspectable_client.h" | 46 #include "chromeos/dbus/fake_introspectable_client.h" |
| 47 #include "chromeos/dbus/fake_leadership_daemon_manager_client.h" |
| 47 #include "chromeos/dbus/fake_lorgnette_manager_client.h" | 48 #include "chromeos/dbus/fake_lorgnette_manager_client.h" |
| 48 #include "chromeos/dbus/fake_modem_messaging_client.h" | 49 #include "chromeos/dbus/fake_modem_messaging_client.h" |
| 49 #include "chromeos/dbus/fake_nfc_adapter_client.h" | 50 #include "chromeos/dbus/fake_nfc_adapter_client.h" |
| 50 #include "chromeos/dbus/fake_nfc_device_client.h" | 51 #include "chromeos/dbus/fake_nfc_device_client.h" |
| 51 #include "chromeos/dbus/fake_nfc_manager_client.h" | 52 #include "chromeos/dbus/fake_nfc_manager_client.h" |
| 52 #include "chromeos/dbus/fake_nfc_record_client.h" | 53 #include "chromeos/dbus/fake_nfc_record_client.h" |
| 53 #include "chromeos/dbus/fake_nfc_tag_client.h" | 54 #include "chromeos/dbus/fake_nfc_tag_client.h" |
| 54 #include "chromeos/dbus/fake_peer_daemon_manager_client.h" | 55 #include "chromeos/dbus/fake_peer_daemon_manager_client.h" |
| 55 #include "chromeos/dbus/fake_permission_broker_client.h" | 56 #include "chromeos/dbus/fake_permission_broker_client.h" |
| 56 #include "chromeos/dbus/fake_privet_daemon_client.h" | 57 #include "chromeos/dbus/fake_privet_daemon_client.h" |
| 57 #include "chromeos/dbus/fake_shill_device_client.h" | 58 #include "chromeos/dbus/fake_shill_device_client.h" |
| 58 #include "chromeos/dbus/fake_shill_ipconfig_client.h" | 59 #include "chromeos/dbus/fake_shill_ipconfig_client.h" |
| 59 #include "chromeos/dbus/fake_shill_manager_client.h" | 60 #include "chromeos/dbus/fake_shill_manager_client.h" |
| 60 #include "chromeos/dbus/fake_shill_profile_client.h" | 61 #include "chromeos/dbus/fake_shill_profile_client.h" |
| 61 #include "chromeos/dbus/fake_shill_service_client.h" | 62 #include "chromeos/dbus/fake_shill_service_client.h" |
| 62 #include "chromeos/dbus/fake_shill_third_party_vpn_driver_client.h" | 63 #include "chromeos/dbus/fake_shill_third_party_vpn_driver_client.h" |
| 63 #include "chromeos/dbus/fake_sms_client.h" | 64 #include "chromeos/dbus/fake_sms_client.h" |
| 64 #include "chromeos/dbus/fake_system_clock_client.h" | 65 #include "chromeos/dbus/fake_system_clock_client.h" |
| 65 #include "chromeos/dbus/gsm_sms_client.h" | 66 #include "chromeos/dbus/gsm_sms_client.h" |
| 66 #include "chromeos/dbus/image_burner_client.h" | 67 #include "chromeos/dbus/image_burner_client.h" |
| 67 #include "chromeos/dbus/introspectable_client.h" | 68 #include "chromeos/dbus/introspectable_client.h" |
| 69 #include "chromeos/dbus/leadership_daemon_manager_client.h" |
| 68 #include "chromeos/dbus/lorgnette_manager_client.h" | 70 #include "chromeos/dbus/lorgnette_manager_client.h" |
| 69 #include "chromeos/dbus/modem_messaging_client.h" | 71 #include "chromeos/dbus/modem_messaging_client.h" |
| 70 #include "chromeos/dbus/nfc_adapter_client.h" | 72 #include "chromeos/dbus/nfc_adapter_client.h" |
| 71 #include "chromeos/dbus/nfc_device_client.h" | 73 #include "chromeos/dbus/nfc_device_client.h" |
| 72 #include "chromeos/dbus/nfc_manager_client.h" | 74 #include "chromeos/dbus/nfc_manager_client.h" |
| 73 #include "chromeos/dbus/nfc_record_client.h" | 75 #include "chromeos/dbus/nfc_record_client.h" |
| 74 #include "chromeos/dbus/nfc_tag_client.h" | 76 #include "chromeos/dbus/nfc_tag_client.h" |
| 75 #include "chromeos/dbus/peer_daemon_manager_client.h" | 77 #include "chromeos/dbus/peer_daemon_manager_client.h" |
| 76 #include "chromeos/dbus/permission_broker_client.h" | 78 #include "chromeos/dbus/permission_broker_client.h" |
| 77 #include "chromeos/dbus/power_manager_client.h" | 79 #include "chromeos/dbus/power_manager_client.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 96 const struct { | 98 const struct { |
| 97 const char* param_name; | 99 const char* param_name; |
| 98 DBusClientBundle::DBusClientType client_type; | 100 DBusClientBundle::DBusClientType client_type; |
| 99 } client_type_map[] = { | 101 } client_type_map[] = { |
| 100 { "bluetooth", DBusClientBundle::BLUETOOTH }, | 102 { "bluetooth", DBusClientBundle::BLUETOOTH }, |
| 101 { "cras", DBusClientBundle::CRAS }, | 103 { "cras", DBusClientBundle::CRAS }, |
| 102 { "cros_disks", DBusClientBundle::CROS_DISKS }, | 104 { "cros_disks", DBusClientBundle::CROS_DISKS }, |
| 103 { "cryptohome", DBusClientBundle::CRYPTOHOME }, | 105 { "cryptohome", DBusClientBundle::CRYPTOHOME }, |
| 104 { "debug_daemon", DBusClientBundle::DEBUG_DAEMON }, | 106 { "debug_daemon", DBusClientBundle::DEBUG_DAEMON }, |
| 105 { "easy_unlock", DBusClientBundle::EASY_UNLOCK }, | 107 { "easy_unlock", DBusClientBundle::EASY_UNLOCK }, |
| 108 { "leadership_daemon", DBusClientBundle::LEADERSHIP_DAEMON }, |
| 106 { "lorgnette_manager", DBusClientBundle::LORGNETTE_MANAGER }, | 109 { "lorgnette_manager", DBusClientBundle::LORGNETTE_MANAGER }, |
| 107 { "shill", DBusClientBundle::SHILL }, | 110 { "shill", DBusClientBundle::SHILL }, |
| 108 { "gsm_sms", DBusClientBundle::GSM_SMS }, | 111 { "gsm_sms", DBusClientBundle::GSM_SMS }, |
| 109 { "image_burner", DBusClientBundle::IMAGE_BURNER }, | 112 { "image_burner", DBusClientBundle::IMAGE_BURNER }, |
| 110 { "introspectable", DBusClientBundle::INTROSPECTABLE }, | 113 { "introspectable", DBusClientBundle::INTROSPECTABLE }, |
| 111 { "modem_messaging", DBusClientBundle::MODEM_MESSAGING }, | 114 { "modem_messaging", DBusClientBundle::MODEM_MESSAGING }, |
| 112 { "nfc", DBusClientBundle::NFC }, | 115 { "nfc", DBusClientBundle::NFC }, |
| 113 { "peer_daemon", DBusClientBundle::PEER_DAEMON }, | 116 { "peer_daemon", DBusClientBundle::PEER_DAEMON }, |
| 114 { "permission_broker", DBusClientBundle::PERMISSION_BROKER }, | 117 { "permission_broker", DBusClientBundle::PERMISSION_BROKER }, |
| 115 { "power_manager", DBusClientBundle::POWER_MANAGER }, | 118 { "power_manager", DBusClientBundle::POWER_MANAGER }, |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 if (!IsUsingStub(PERMISSION_BROKER)) | 273 if (!IsUsingStub(PERMISSION_BROKER)) |
| 271 permission_broker_client_.reset(PermissionBrokerClient::Create()); | 274 permission_broker_client_.reset(PermissionBrokerClient::Create()); |
| 272 else | 275 else |
| 273 permission_broker_client_.reset(new FakePermissionBrokerClient); | 276 permission_broker_client_.reset(new FakePermissionBrokerClient); |
| 274 | 277 |
| 275 if (!IsUsingStub(PRIVET_DAEMON)) | 278 if (!IsUsingStub(PRIVET_DAEMON)) |
| 276 privet_daemon_client_.reset(PrivetDaemonClient::Create()); | 279 privet_daemon_client_.reset(PrivetDaemonClient::Create()); |
| 277 else | 280 else |
| 278 privet_daemon_client_.reset(new FakePrivetDaemonClient); | 281 privet_daemon_client_.reset(new FakePrivetDaemonClient); |
| 279 | 282 |
| 283 if (!IsUsingStub(LEADERSHIP_DAEMON)) |
| 284 leadership_daemon_manager_client_.reset( |
| 285 LeadershipDaemonManagerClient::Create()); |
| 286 else |
| 287 leadership_daemon_manager_client_.reset( |
| 288 new FakeLeadershipDaemonManagerClient); |
| 289 |
| 280 power_manager_client_.reset(PowerManagerClient::Create( | 290 power_manager_client_.reset(PowerManagerClient::Create( |
| 281 IsUsingStub(POWER_MANAGER) ? STUB_DBUS_CLIENT_IMPLEMENTATION | 291 IsUsingStub(POWER_MANAGER) ? STUB_DBUS_CLIENT_IMPLEMENTATION |
| 282 : REAL_DBUS_CLIENT_IMPLEMENTATION)); | 292 : REAL_DBUS_CLIENT_IMPLEMENTATION)); |
| 283 | 293 |
| 284 session_manager_client_.reset(SessionManagerClient::Create( | 294 session_manager_client_.reset(SessionManagerClient::Create( |
| 285 IsUsingStub(SESSION_MANAGER) ? STUB_DBUS_CLIENT_IMPLEMENTATION | 295 IsUsingStub(SESSION_MANAGER) ? STUB_DBUS_CLIENT_IMPLEMENTATION |
| 286 : REAL_DBUS_CLIENT_IMPLEMENTATION)); | 296 : REAL_DBUS_CLIENT_IMPLEMENTATION)); |
| 287 | 297 |
| 288 if (!IsUsingStub(SMS)) | 298 if (!IsUsingStub(SMS)) |
| 289 sms_client_.reset(SMSClient::Create()); | 299 sms_client_.reset(SMSClient::Create()); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 unstub_mask |= client; | 344 unstub_mask |= client; |
| 335 } else { | 345 } else { |
| 336 LOG(ERROR) << "Unknown dbus client: " << *iter; | 346 LOG(ERROR) << "Unknown dbus client: " << *iter; |
| 337 } | 347 } |
| 338 } | 348 } |
| 339 | 349 |
| 340 return unstub_mask; | 350 return unstub_mask; |
| 341 } | 351 } |
| 342 | 352 |
| 343 } // namespace chromeos | 353 } // namespace chromeos |
| OLD | NEW |