Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Side by Side Diff: chromeos/dbus/dbus_client_bundle.cc

Issue 935933002: Adds metronome time sync dbus client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adds a command line flag to use a timer-based fake implementation Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chromeos/dbus/dbus_client_bundle.h ('k') | chromeos/dbus/dbus_thread_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 #include "chromeos/dbus/fake_shill_profile_client.h" 60 #include "chromeos/dbus/fake_shill_profile_client.h"
61 #include "chromeos/dbus/fake_shill_service_client.h" 61 #include "chromeos/dbus/fake_shill_service_client.h"
62 #include "chromeos/dbus/fake_shill_third_party_vpn_driver_client.h" 62 #include "chromeos/dbus/fake_shill_third_party_vpn_driver_client.h"
63 #include "chromeos/dbus/fake_sms_client.h" 63 #include "chromeos/dbus/fake_sms_client.h"
64 #include "chromeos/dbus/fake_system_clock_client.h" 64 #include "chromeos/dbus/fake_system_clock_client.h"
65 #include "chromeos/dbus/gsm_sms_client.h" 65 #include "chromeos/dbus/gsm_sms_client.h"
66 #include "chromeos/dbus/image_burner_client.h" 66 #include "chromeos/dbus/image_burner_client.h"
67 #include "chromeos/dbus/introspectable_client.h" 67 #include "chromeos/dbus/introspectable_client.h"
68 #include "chromeos/dbus/leadership_daemon_manager_client.h" 68 #include "chromeos/dbus/leadership_daemon_manager_client.h"
69 #include "chromeos/dbus/lorgnette_manager_client.h" 69 #include "chromeos/dbus/lorgnette_manager_client.h"
70 #include "chromeos/dbus/metronome_client.h"
70 #include "chromeos/dbus/modem_messaging_client.h" 71 #include "chromeos/dbus/modem_messaging_client.h"
71 #include "chromeos/dbus/nfc_adapter_client.h" 72 #include "chromeos/dbus/nfc_adapter_client.h"
72 #include "chromeos/dbus/nfc_device_client.h" 73 #include "chromeos/dbus/nfc_device_client.h"
73 #include "chromeos/dbus/nfc_manager_client.h" 74 #include "chromeos/dbus/nfc_manager_client.h"
74 #include "chromeos/dbus/nfc_record_client.h" 75 #include "chromeos/dbus/nfc_record_client.h"
75 #include "chromeos/dbus/nfc_tag_client.h" 76 #include "chromeos/dbus/nfc_tag_client.h"
76 #include "chromeos/dbus/peer_daemon_manager_client.h" 77 #include "chromeos/dbus/peer_daemon_manager_client.h"
77 #include "chromeos/dbus/permission_broker_client.h" 78 #include "chromeos/dbus/permission_broker_client.h"
78 #include "chromeos/dbus/power_manager_client.h" 79 #include "chromeos/dbus/power_manager_client.h"
79 #include "chromeos/dbus/power_policy_controller.h" 80 #include "chromeos/dbus/power_policy_controller.h"
(...skipping 18 matching lines...) Expand all
98 DBusClientBundle::DBusClientType client_type; 99 DBusClientBundle::DBusClientType client_type;
99 } client_type_map[] = { 100 } client_type_map[] = {
100 { "bluetooth", DBusClientBundle::BLUETOOTH }, 101 { "bluetooth", DBusClientBundle::BLUETOOTH },
101 { "cras", DBusClientBundle::CRAS }, 102 { "cras", DBusClientBundle::CRAS },
102 { "cros_disks", DBusClientBundle::CROS_DISKS }, 103 { "cros_disks", DBusClientBundle::CROS_DISKS },
103 { "cryptohome", DBusClientBundle::CRYPTOHOME }, 104 { "cryptohome", DBusClientBundle::CRYPTOHOME },
104 { "debug_daemon", DBusClientBundle::DEBUG_DAEMON }, 105 { "debug_daemon", DBusClientBundle::DEBUG_DAEMON },
105 { "easy_unlock", DBusClientBundle::EASY_UNLOCK }, 106 { "easy_unlock", DBusClientBundle::EASY_UNLOCK },
106 { "leadership_daemon", DBusClientBundle::LEADERSHIP_DAEMON }, 107 { "leadership_daemon", DBusClientBundle::LEADERSHIP_DAEMON },
107 { "lorgnette_manager", DBusClientBundle::LORGNETTE_MANAGER }, 108 { "lorgnette_manager", DBusClientBundle::LORGNETTE_MANAGER },
109 { "metronome", DBusClientBundle::METRONOME },
108 { "shill", DBusClientBundle::SHILL }, 110 { "shill", DBusClientBundle::SHILL },
109 { "gsm_sms", DBusClientBundle::GSM_SMS }, 111 { "gsm_sms", DBusClientBundle::GSM_SMS },
110 { "image_burner", DBusClientBundle::IMAGE_BURNER }, 112 { "image_burner", DBusClientBundle::IMAGE_BURNER },
111 { "introspectable", DBusClientBundle::INTROSPECTABLE }, 113 { "introspectable", DBusClientBundle::INTROSPECTABLE },
112 { "modem_messaging", DBusClientBundle::MODEM_MESSAGING }, 114 { "modem_messaging", DBusClientBundle::MODEM_MESSAGING },
113 { "nfc", DBusClientBundle::NFC }, 115 { "nfc", DBusClientBundle::NFC },
114 { "peer_daemon", DBusClientBundle::PEER_DAEMON }, 116 { "peer_daemon", DBusClientBundle::PEER_DAEMON },
115 { "permission_broker", DBusClientBundle::PERMISSION_BROKER }, 117 { "permission_broker", DBusClientBundle::PERMISSION_BROKER },
116 { "power_manager", DBusClientBundle::POWER_MANAGER }, 118 { "power_manager", DBusClientBundle::POWER_MANAGER },
117 { "session_manager", DBusClientBundle::SESSION_MANAGER }, 119 { "session_manager", DBusClientBundle::SESSION_MANAGER },
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 if (!IsUsingStub(EASY_UNLOCK)) 196 if (!IsUsingStub(EASY_UNLOCK))
195 easy_unlock_client_.reset(EasyUnlockClient::Create()); 197 easy_unlock_client_.reset(EasyUnlockClient::Create());
196 else 198 else
197 easy_unlock_client_.reset(new FakeEasyUnlockClient); 199 easy_unlock_client_.reset(new FakeEasyUnlockClient);
198 200
199 if (!IsUsingStub(LORGNETTE_MANAGER)) 201 if (!IsUsingStub(LORGNETTE_MANAGER))
200 lorgnette_manager_client_.reset(LorgnetteManagerClient::Create()); 202 lorgnette_manager_client_.reset(LorgnetteManagerClient::Create());
201 else 203 else
202 lorgnette_manager_client_.reset(new FakeLorgnetteManagerClient); 204 lorgnette_manager_client_.reset(new FakeLorgnetteManagerClient);
203 205
206 metronome_client_.reset(MetronomeClient::Create(
207 IsUsingStub(METRONOME) ? STUB_DBUS_CLIENT_IMPLEMENTATION
208 : REAL_DBUS_CLIENT_IMPLEMENTATION));
209
204 if (!IsUsingStub(SHILL)) { 210 if (!IsUsingStub(SHILL)) {
205 shill_manager_client_.reset(ShillManagerClient::Create()); 211 shill_manager_client_.reset(ShillManagerClient::Create());
206 shill_device_client_.reset(ShillDeviceClient::Create()); 212 shill_device_client_.reset(ShillDeviceClient::Create());
207 shill_ipconfig_client_.reset(ShillIPConfigClient::Create()); 213 shill_ipconfig_client_.reset(ShillIPConfigClient::Create());
208 shill_service_client_.reset(ShillServiceClient::Create()); 214 shill_service_client_.reset(ShillServiceClient::Create());
209 shill_profile_client_.reset(ShillProfileClient::Create()); 215 shill_profile_client_.reset(ShillProfileClient::Create());
210 shill_third_party_vpn_driver_client_.reset( 216 shill_third_party_vpn_driver_client_.reset(
211 ShillThirdPartyVpnDriverClient::Create()); 217 ShillThirdPartyVpnDriverClient::Create());
212 } else { 218 } else {
213 shill_manager_client_.reset(new FakeShillManagerClient); 219 shill_manager_client_.reset(new FakeShillManagerClient);
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 unstub_mask |= client; 343 unstub_mask |= client;
338 } else { 344 } else {
339 LOG(ERROR) << "Unknown dbus client: " << *iter; 345 LOG(ERROR) << "Unknown dbus client: " << *iter;
340 } 346 }
341 } 347 }
342 348
343 return unstub_mask; 349 return unstub_mask;
344 } 350 }
345 351
346 } // namespace chromeos 352 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/dbus_client_bundle.h ('k') | chromeos/dbus/dbus_thread_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698