| 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 "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/strings/string_split.h" | 8 #include "base/strings/string_split.h" |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "chromeos/chromeos_switches.h" | 10 #include "chromeos/chromeos_switches.h" |
| 11 #include "chromeos/dbus/bluetooth_adapter_client.h" | 11 #include "chromeos/dbus/bluetooth_adapter_client.h" |
| 12 #include "chromeos/dbus/bluetooth_agent_manager_client.h" | 12 #include "chromeos/dbus/bluetooth_agent_manager_client.h" |
| 13 #include "chromeos/dbus/bluetooth_device_client.h" | 13 #include "chromeos/dbus/bluetooth_device_client.h" |
| 14 #include "chromeos/dbus/bluetooth_gatt_characteristic_client.h" | 14 #include "chromeos/dbus/bluetooth_gatt_characteristic_client.h" |
| 15 #include "chromeos/dbus/bluetooth_gatt_descriptor_client.h" | 15 #include "chromeos/dbus/bluetooth_gatt_descriptor_client.h" |
| 16 #include "chromeos/dbus/bluetooth_gatt_manager_client.h" | 16 #include "chromeos/dbus/bluetooth_gatt_manager_client.h" |
| 17 #include "chromeos/dbus/bluetooth_gatt_service_client.h" | 17 #include "chromeos/dbus/bluetooth_gatt_service_client.h" |
| 18 #include "chromeos/dbus/bluetooth_input_client.h" | 18 #include "chromeos/dbus/bluetooth_input_client.h" |
| 19 #include "chromeos/dbus/bluetooth_profile_manager_client.h" | 19 #include "chromeos/dbus/bluetooth_profile_manager_client.h" |
| 20 #include "chromeos/dbus/cras_audio_client.h" | 20 #include "chromeos/dbus/cras_audio_client.h" |
| 21 #include "chromeos/dbus/cras_audio_client_stub_impl.h" | |
| 22 #include "chromeos/dbus/cros_disks_client.h" | 21 #include "chromeos/dbus/cros_disks_client.h" |
| 23 #include "chromeos/dbus/cryptohome_client.h" | 22 #include "chromeos/dbus/cryptohome_client.h" |
| 24 #include "chromeos/dbus/debug_daemon_client.h" | 23 #include "chromeos/dbus/debug_daemon_client.h" |
| 25 #include "chromeos/dbus/easy_unlock_client.h" | 24 #include "chromeos/dbus/easy_unlock_client.h" |
| 26 #include "chromeos/dbus/fake_bluetooth_adapter_client.h" | 25 #include "chromeos/dbus/fake_bluetooth_adapter_client.h" |
| 27 #include "chromeos/dbus/fake_bluetooth_agent_manager_client.h" | 26 #include "chromeos/dbus/fake_bluetooth_agent_manager_client.h" |
| 28 #include "chromeos/dbus/fake_bluetooth_device_client.h" | 27 #include "chromeos/dbus/fake_bluetooth_device_client.h" |
| 29 #include "chromeos/dbus/fake_bluetooth_gatt_characteristic_client.h" | 28 #include "chromeos/dbus/fake_bluetooth_gatt_characteristic_client.h" |
| 30 #include "chromeos/dbus/fake_bluetooth_gatt_descriptor_client.h" | 29 #include "chromeos/dbus/fake_bluetooth_gatt_descriptor_client.h" |
| 31 #include "chromeos/dbus/fake_bluetooth_gatt_manager_client.h" | 30 #include "chromeos/dbus/fake_bluetooth_gatt_manager_client.h" |
| 32 #include "chromeos/dbus/fake_bluetooth_gatt_service_client.h" | 31 #include "chromeos/dbus/fake_bluetooth_gatt_service_client.h" |
| 33 #include "chromeos/dbus/fake_bluetooth_input_client.h" | 32 #include "chromeos/dbus/fake_bluetooth_input_client.h" |
| 34 #include "chromeos/dbus/fake_bluetooth_profile_manager_client.h" | 33 #include "chromeos/dbus/fake_bluetooth_profile_manager_client.h" |
| 34 #include "chromeos/dbus/fake_cras_audio_client.h" |
| 35 #include "chromeos/dbus/fake_cryptohome_client.h" | 35 #include "chromeos/dbus/fake_cryptohome_client.h" |
| 36 #include "chromeos/dbus/fake_debug_daemon_client.h" | 36 #include "chromeos/dbus/fake_debug_daemon_client.h" |
| 37 #include "chromeos/dbus/fake_easy_unlock_client.h" | 37 #include "chromeos/dbus/fake_easy_unlock_client.h" |
| 38 #include "chromeos/dbus/fake_gsm_sms_client.h" | 38 #include "chromeos/dbus/fake_gsm_sms_client.h" |
| 39 #include "chromeos/dbus/fake_image_burner_client.h" | 39 #include "chromeos/dbus/fake_image_burner_client.h" |
| 40 #include "chromeos/dbus/fake_introspectable_client.h" | 40 #include "chromeos/dbus/fake_introspectable_client.h" |
| 41 #include "chromeos/dbus/fake_lorgnette_manager_client.h" | 41 #include "chromeos/dbus/fake_lorgnette_manager_client.h" |
| 42 #include "chromeos/dbus/fake_modem_messaging_client.h" | 42 #include "chromeos/dbus/fake_modem_messaging_client.h" |
| 43 #include "chromeos/dbus/fake_nfc_adapter_client.h" | 43 #include "chromeos/dbus/fake_nfc_adapter_client.h" |
| 44 #include "chromeos/dbus/fake_nfc_device_client.h" | 44 #include "chromeos/dbus/fake_nfc_device_client.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 new FakeBluetoothGattCharacteristicClient); | 148 new FakeBluetoothGattCharacteristicClient); |
| 149 bluetooth_gatt_descriptor_client_.reset( | 149 bluetooth_gatt_descriptor_client_.reset( |
| 150 new FakeBluetoothGattDescriptorClient); | 150 new FakeBluetoothGattDescriptorClient); |
| 151 bluetooth_gatt_manager_client_.reset(new FakeBluetoothGattManagerClient); | 151 bluetooth_gatt_manager_client_.reset(new FakeBluetoothGattManagerClient); |
| 152 bluetooth_gatt_service_client_.reset(new FakeBluetoothGattServiceClient); | 152 bluetooth_gatt_service_client_.reset(new FakeBluetoothGattServiceClient); |
| 153 } | 153 } |
| 154 | 154 |
| 155 if (!IsUsingStub(CRAS)) | 155 if (!IsUsingStub(CRAS)) |
| 156 cras_audio_client_.reset(CrasAudioClient::Create()); | 156 cras_audio_client_.reset(CrasAudioClient::Create()); |
| 157 else | 157 else |
| 158 cras_audio_client_.reset(new CrasAudioClientStubImpl); | 158 cras_audio_client_.reset(new FakeCrasAudioClient); |
| 159 | 159 |
| 160 cros_disks_client_.reset(CrosDisksClient::Create( | 160 cros_disks_client_.reset(CrosDisksClient::Create( |
| 161 IsUsingStub(CROS_DISKS) ? STUB_DBUS_CLIENT_IMPLEMENTATION | 161 IsUsingStub(CROS_DISKS) ? STUB_DBUS_CLIENT_IMPLEMENTATION |
| 162 : REAL_DBUS_CLIENT_IMPLEMENTATION)); | 162 : REAL_DBUS_CLIENT_IMPLEMENTATION)); |
| 163 | 163 |
| 164 if (!IsUsingStub(CRYPTOHOME)) | 164 if (!IsUsingStub(CRYPTOHOME)) |
| 165 cryptohome_client_.reset(CryptohomeClient::Create()); | 165 cryptohome_client_.reset(CryptohomeClient::Create()); |
| 166 else | 166 else |
| 167 cryptohome_client_.reset(new FakeCryptohomeClient); | 167 cryptohome_client_.reset(new FakeCryptohomeClient); |
| 168 | 168 |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 unstub_mask |= client; | 300 unstub_mask |= client; |
| 301 } else { | 301 } else { |
| 302 LOG(ERROR) << "Unknown dbus client: " << *iter; | 302 LOG(ERROR) << "Unknown dbus client: " << *iter; |
| 303 } | 303 } |
| 304 } | 304 } |
| 305 | 305 |
| 306 return unstub_mask; | 306 return unstub_mask; |
| 307 } | 307 } |
| 308 | 308 |
| 309 } // namespace chromeos | 309 } // namespace chromeos |
| OLD | NEW |