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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 #include "chromeos/dbus/fake_shill_profile_client.h" | 61 #include "chromeos/dbus/fake_shill_profile_client.h" |
62 #include "chromeos/dbus/fake_shill_service_client.h" | 62 #include "chromeos/dbus/fake_shill_service_client.h" |
63 #include "chromeos/dbus/fake_shill_third_party_vpn_driver_client.h" | 63 #include "chromeos/dbus/fake_shill_third_party_vpn_driver_client.h" |
64 #include "chromeos/dbus/fake_sms_client.h" | 64 #include "chromeos/dbus/fake_sms_client.h" |
65 #include "chromeos/dbus/fake_system_clock_client.h" | 65 #include "chromeos/dbus/fake_system_clock_client.h" |
66 #include "chromeos/dbus/gsm_sms_client.h" | 66 #include "chromeos/dbus/gsm_sms_client.h" |
67 #include "chromeos/dbus/image_burner_client.h" | 67 #include "chromeos/dbus/image_burner_client.h" |
68 #include "chromeos/dbus/introspectable_client.h" | 68 #include "chromeos/dbus/introspectable_client.h" |
69 #include "chromeos/dbus/leadership_daemon_manager_client.h" | 69 #include "chromeos/dbus/leadership_daemon_manager_client.h" |
70 #include "chromeos/dbus/lorgnette_manager_client.h" | 70 #include "chromeos/dbus/lorgnette_manager_client.h" |
| 71 #include "chromeos/dbus/metronome_client.h" |
71 #include "chromeos/dbus/modem_messaging_client.h" | 72 #include "chromeos/dbus/modem_messaging_client.h" |
72 #include "chromeos/dbus/nfc_adapter_client.h" | 73 #include "chromeos/dbus/nfc_adapter_client.h" |
73 #include "chromeos/dbus/nfc_device_client.h" | 74 #include "chromeos/dbus/nfc_device_client.h" |
74 #include "chromeos/dbus/nfc_manager_client.h" | 75 #include "chromeos/dbus/nfc_manager_client.h" |
75 #include "chromeos/dbus/nfc_record_client.h" | 76 #include "chromeos/dbus/nfc_record_client.h" |
76 #include "chromeos/dbus/nfc_tag_client.h" | 77 #include "chromeos/dbus/nfc_tag_client.h" |
77 #include "chromeos/dbus/peer_daemon_manager_client.h" | 78 #include "chromeos/dbus/peer_daemon_manager_client.h" |
78 #include "chromeos/dbus/permission_broker_client.h" | 79 #include "chromeos/dbus/permission_broker_client.h" |
79 #include "chromeos/dbus/power_manager_client.h" | 80 #include "chromeos/dbus/power_manager_client.h" |
80 #include "chromeos/dbus/power_policy_controller.h" | 81 #include "chromeos/dbus/power_policy_controller.h" |
(...skipping 19 matching lines...) Expand all Loading... |
100 DBusClientBundle::DBusClientType client_type; | 101 DBusClientBundle::DBusClientType client_type; |
101 } client_type_map[] = { | 102 } client_type_map[] = { |
102 { "bluetooth", DBusClientBundle::BLUETOOTH }, | 103 { "bluetooth", DBusClientBundle::BLUETOOTH }, |
103 { "cras", DBusClientBundle::CRAS }, | 104 { "cras", DBusClientBundle::CRAS }, |
104 { "cros_disks", DBusClientBundle::CROS_DISKS }, | 105 { "cros_disks", DBusClientBundle::CROS_DISKS }, |
105 { "cryptohome", DBusClientBundle::CRYPTOHOME }, | 106 { "cryptohome", DBusClientBundle::CRYPTOHOME }, |
106 { "debug_daemon", DBusClientBundle::DEBUG_DAEMON }, | 107 { "debug_daemon", DBusClientBundle::DEBUG_DAEMON }, |
107 { "easy_unlock", DBusClientBundle::EASY_UNLOCK }, | 108 { "easy_unlock", DBusClientBundle::EASY_UNLOCK }, |
108 { "leadership_daemon", DBusClientBundle::LEADERSHIP_DAEMON }, | 109 { "leadership_daemon", DBusClientBundle::LEADERSHIP_DAEMON }, |
109 { "lorgnette_manager", DBusClientBundle::LORGNETTE_MANAGER }, | 110 { "lorgnette_manager", DBusClientBundle::LORGNETTE_MANAGER }, |
| 111 { "metronome", DBusClientBundle::METRONOME }, |
110 { "shill", DBusClientBundle::SHILL }, | 112 { "shill", DBusClientBundle::SHILL }, |
111 { "gsm_sms", DBusClientBundle::GSM_SMS }, | 113 { "gsm_sms", DBusClientBundle::GSM_SMS }, |
112 { "image_burner", DBusClientBundle::IMAGE_BURNER }, | 114 { "image_burner", DBusClientBundle::IMAGE_BURNER }, |
113 { "introspectable", DBusClientBundle::INTROSPECTABLE }, | 115 { "introspectable", DBusClientBundle::INTROSPECTABLE }, |
114 { "modem_messaging", DBusClientBundle::MODEM_MESSAGING }, | 116 { "modem_messaging", DBusClientBundle::MODEM_MESSAGING }, |
115 { "nfc", DBusClientBundle::NFC }, | 117 { "nfc", DBusClientBundle::NFC }, |
116 { "peer_daemon", DBusClientBundle::PEER_DAEMON }, | 118 { "peer_daemon", DBusClientBundle::PEER_DAEMON }, |
117 { "permission_broker", DBusClientBundle::PERMISSION_BROKER }, | 119 { "permission_broker", DBusClientBundle::PERMISSION_BROKER }, |
118 { "power_manager", DBusClientBundle::POWER_MANAGER }, | 120 { "power_manager", DBusClientBundle::POWER_MANAGER }, |
119 { "privet_daemon", DBusClientBundle::PRIVET_DAEMON }, | 121 { "privet_daemon", DBusClientBundle::PRIVET_DAEMON }, |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 if (!IsUsingStub(EASY_UNLOCK)) | 199 if (!IsUsingStub(EASY_UNLOCK)) |
198 easy_unlock_client_.reset(EasyUnlockClient::Create()); | 200 easy_unlock_client_.reset(EasyUnlockClient::Create()); |
199 else | 201 else |
200 easy_unlock_client_.reset(new FakeEasyUnlockClient); | 202 easy_unlock_client_.reset(new FakeEasyUnlockClient); |
201 | 203 |
202 if (!IsUsingStub(LORGNETTE_MANAGER)) | 204 if (!IsUsingStub(LORGNETTE_MANAGER)) |
203 lorgnette_manager_client_.reset(LorgnetteManagerClient::Create()); | 205 lorgnette_manager_client_.reset(LorgnetteManagerClient::Create()); |
204 else | 206 else |
205 lorgnette_manager_client_.reset(new FakeLorgnetteManagerClient); | 207 lorgnette_manager_client_.reset(new FakeLorgnetteManagerClient); |
206 | 208 |
| 209 metronome_client_.reset(MetronomeClient::Create( |
| 210 IsUsingStub(METRONOME) ? STUB_DBUS_CLIENT_IMPLEMENTATION |
| 211 : REAL_DBUS_CLIENT_IMPLEMENTATION)); |
| 212 |
207 if (!IsUsingStub(SHILL)) { | 213 if (!IsUsingStub(SHILL)) { |
208 shill_manager_client_.reset(ShillManagerClient::Create()); | 214 shill_manager_client_.reset(ShillManagerClient::Create()); |
209 shill_device_client_.reset(ShillDeviceClient::Create()); | 215 shill_device_client_.reset(ShillDeviceClient::Create()); |
210 shill_ipconfig_client_.reset(ShillIPConfigClient::Create()); | 216 shill_ipconfig_client_.reset(ShillIPConfigClient::Create()); |
211 shill_service_client_.reset(ShillServiceClient::Create()); | 217 shill_service_client_.reset(ShillServiceClient::Create()); |
212 shill_profile_client_.reset(ShillProfileClient::Create()); | 218 shill_profile_client_.reset(ShillProfileClient::Create()); |
213 shill_third_party_vpn_driver_client_.reset( | 219 shill_third_party_vpn_driver_client_.reset( |
214 ShillThirdPartyVpnDriverClient::Create()); | 220 ShillThirdPartyVpnDriverClient::Create()); |
215 } else { | 221 } else { |
216 shill_manager_client_.reset(new FakeShillManagerClient); | 222 shill_manager_client_.reset(new FakeShillManagerClient); |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 unstub_mask |= client; | 351 unstub_mask |= client; |
346 } else { | 352 } else { |
347 LOG(ERROR) << "Unknown dbus client: " << *iter; | 353 LOG(ERROR) << "Unknown dbus client: " << *iter; |
348 } | 354 } |
349 } | 355 } |
350 | 356 |
351 return unstub_mask; | 357 return unstub_mask; |
352 } | 358 } |
353 | 359 |
354 } // namespace chromeos | 360 } // namespace chromeos |
OLD | NEW |