| 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/console_service_client.h" |
| 20 #include "chromeos/dbus/cras_audio_client.h" | 21 #include "chromeos/dbus/cras_audio_client.h" |
| 21 #include "chromeos/dbus/cros_disks_client.h" | 22 #include "chromeos/dbus/cros_disks_client.h" |
| 22 #include "chromeos/dbus/cryptohome_client.h" | 23 #include "chromeos/dbus/cryptohome_client.h" |
| 23 #include "chromeos/dbus/debug_daemon_client.h" | 24 #include "chromeos/dbus/debug_daemon_client.h" |
| 24 #include "chromeos/dbus/easy_unlock_client.h" | 25 #include "chromeos/dbus/easy_unlock_client.h" |
| 25 #include "chromeos/dbus/fake_bluetooth_adapter_client.h" | 26 #include "chromeos/dbus/fake_bluetooth_adapter_client.h" |
| 26 #include "chromeos/dbus/fake_bluetooth_agent_manager_client.h" | 27 #include "chromeos/dbus/fake_bluetooth_agent_manager_client.h" |
| 27 #include "chromeos/dbus/fake_bluetooth_device_client.h" | 28 #include "chromeos/dbus/fake_bluetooth_device_client.h" |
| 28 #include "chromeos/dbus/fake_bluetooth_gatt_characteristic_client.h" | 29 #include "chromeos/dbus/fake_bluetooth_gatt_characteristic_client.h" |
| 29 #include "chromeos/dbus/fake_bluetooth_gatt_descriptor_client.h" | 30 #include "chromeos/dbus/fake_bluetooth_gatt_descriptor_client.h" |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 new FakeBluetoothGattDescriptorClient); | 151 new FakeBluetoothGattDescriptorClient); |
| 151 bluetooth_gatt_manager_client_.reset(new FakeBluetoothGattManagerClient); | 152 bluetooth_gatt_manager_client_.reset(new FakeBluetoothGattManagerClient); |
| 152 bluetooth_gatt_service_client_.reset(new FakeBluetoothGattServiceClient); | 153 bluetooth_gatt_service_client_.reset(new FakeBluetoothGattServiceClient); |
| 153 } | 154 } |
| 154 | 155 |
| 155 if (!IsUsingStub(CRAS)) | 156 if (!IsUsingStub(CRAS)) |
| 156 cras_audio_client_.reset(CrasAudioClient::Create()); | 157 cras_audio_client_.reset(CrasAudioClient::Create()); |
| 157 else | 158 else |
| 158 cras_audio_client_.reset(new FakeCrasAudioClient); | 159 cras_audio_client_.reset(new FakeCrasAudioClient); |
| 159 | 160 |
| 161 console_service_client_.reset(ConsoleServiceClient::Create()); |
| 162 |
| 160 cros_disks_client_.reset(CrosDisksClient::Create( | 163 cros_disks_client_.reset(CrosDisksClient::Create( |
| 161 IsUsingStub(CROS_DISKS) ? STUB_DBUS_CLIENT_IMPLEMENTATION | 164 IsUsingStub(CROS_DISKS) ? STUB_DBUS_CLIENT_IMPLEMENTATION |
| 162 : REAL_DBUS_CLIENT_IMPLEMENTATION)); | 165 : REAL_DBUS_CLIENT_IMPLEMENTATION)); |
| 163 | 166 |
| 164 if (!IsUsingStub(CRYPTOHOME)) | 167 if (!IsUsingStub(CRYPTOHOME)) |
| 165 cryptohome_client_.reset(CryptohomeClient::Create()); | 168 cryptohome_client_.reset(CryptohomeClient::Create()); |
| 166 else | 169 else |
| 167 cryptohome_client_.reset(new FakeCryptohomeClient); | 170 cryptohome_client_.reset(new FakeCryptohomeClient); |
| 168 | 171 |
| 169 if (!IsUsingStub(DEBUG_DAEMON)) | 172 if (!IsUsingStub(DEBUG_DAEMON)) |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 unstub_mask |= client; | 303 unstub_mask |= client; |
| 301 } else { | 304 } else { |
| 302 LOG(ERROR) << "Unknown dbus client: " << *iter; | 305 LOG(ERROR) << "Unknown dbus client: " << *iter; |
| 303 } | 306 } |
| 304 } | 307 } |
| 305 | 308 |
| 306 return unstub_mask; | 309 return unstub_mask; |
| 307 } | 310 } |
| 308 | 311 |
| 309 } // namespace chromeos | 312 } // namespace chromeos |
| OLD | NEW |