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

Side by Side Diff: chromeos/dbus/dbus_clients_common.h

Issue 2350543002: chromeos; Remove unused switch --dbus-unstub-clients / --dbus-real-clients (Closed)
Patch Set: rebase again Created 4 years, 3 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_clients_browser.cc ('k') | chromeos/dbus/dbus_clients_common.cc » ('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 #ifndef CHROMEOS_DBUS_DBUS_CLIENTS_COMMON_H_ 5 #ifndef CHROMEOS_DBUS_DBUS_CLIENTS_COMMON_H_
6 #define CHROMEOS_DBUS_DBUS_CLIENTS_COMMON_H_ 6 #define CHROMEOS_DBUS_DBUS_CLIENTS_COMMON_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string>
10 9
11 #include "base/macros.h" 10 #include "base/macros.h"
12 #include "chromeos/chromeos_export.h" 11 #include "chromeos/chromeos_export.h"
13 #include "chromeos/dbus/dbus_client_types.h"
14 12
15 namespace dbus { 13 namespace dbus {
16 class Bus; 14 class Bus;
17 } 15 }
18 16
19 namespace chromeos { 17 namespace chromeos {
20 18
21 class CrasAudioClient; 19 class CrasAudioClient;
22 class CryptohomeClient; 20 class CryptohomeClient;
23 class GsmSMSClient; 21 class GsmSMSClient;
24 class ModemMessagingClient; 22 class ModemMessagingClient;
25 class PermissionBrokerClient; 23 class PermissionBrokerClient;
26 class PowerManagerClient; 24 class PowerManagerClient;
27 class SessionManagerClient; 25 class SessionManagerClient;
28 class ShillDeviceClient; 26 class ShillDeviceClient;
29 class ShillIPConfigClient; 27 class ShillIPConfigClient;
30 class ShillManagerClient; 28 class ShillManagerClient;
31 class ShillProfileClient; 29 class ShillProfileClient;
32 class ShillServiceClient; 30 class ShillServiceClient;
33 class ShillThirdPartyVpnDriverClient; 31 class ShillThirdPartyVpnDriverClient;
34 class SMSClient; 32 class SMSClient;
35 class SystemClockClient; 33 class SystemClockClient;
36 class UpdateEngineClient; 34 class UpdateEngineClient;
37 35
38 // D-Bus clients used in multiple processes (e.g. ash, browser, mus). 36 // D-Bus clients used in multiple processes (e.g. ash, browser, mus).
39 class CHROMEOS_EXPORT DBusClientsCommon { 37 class CHROMEOS_EXPORT DBusClientsCommon {
40 public: 38 public:
41 // Creates real implementations for |real_client_mask| and fakes for all 39 // Creates real implementations if |use_real_clients| is true and fakes
42 // others. Fakes are used when running on Linux desktop and in tests. 40 // otherwise. Fakes are used when running on Linux desktop and in tests.
43 explicit DBusClientsCommon(DBusClientTypeMask real_client_mask); 41 explicit DBusClientsCommon(bool use_real_clients);
44 ~DBusClientsCommon(); 42 ~DBusClientsCommon();
45 43
46 // Returns true if |client| has a real (non-fake) client implementation.
47 bool IsUsingReal(DBusClientType client) const;
48
49 // Initialize proper runtime environment for its dbus clients. 44 // Initialize proper runtime environment for its dbus clients.
50 void Initialize(dbus::Bus* system_bus); 45 void Initialize(dbus::Bus* system_bus);
51 46
52 private: 47 private:
53 friend class DBusThreadManager; 48 friend class DBusThreadManager;
54 friend class DBusThreadManagerSetter; 49 friend class DBusThreadManagerSetter;
55 50
56 // Bitmask for clients with real implementations.
57 const DBusClientTypeMask real_client_mask_;
58
59 std::unique_ptr<CrasAudioClient> cras_audio_client_; 51 std::unique_ptr<CrasAudioClient> cras_audio_client_;
60 std::unique_ptr<CryptohomeClient> cryptohome_client_; 52 std::unique_ptr<CryptohomeClient> cryptohome_client_;
61 std::unique_ptr<GsmSMSClient> gsm_sms_client_; 53 std::unique_ptr<GsmSMSClient> gsm_sms_client_;
62 std::unique_ptr<ModemMessagingClient> modem_messaging_client_; 54 std::unique_ptr<ModemMessagingClient> modem_messaging_client_;
63 std::unique_ptr<ShillDeviceClient> shill_device_client_; 55 std::unique_ptr<ShillDeviceClient> shill_device_client_;
64 std::unique_ptr<ShillIPConfigClient> shill_ipconfig_client_; 56 std::unique_ptr<ShillIPConfigClient> shill_ipconfig_client_;
65 std::unique_ptr<ShillManagerClient> shill_manager_client_; 57 std::unique_ptr<ShillManagerClient> shill_manager_client_;
66 std::unique_ptr<ShillServiceClient> shill_service_client_; 58 std::unique_ptr<ShillServiceClient> shill_service_client_;
67 std::unique_ptr<ShillProfileClient> shill_profile_client_; 59 std::unique_ptr<ShillProfileClient> shill_profile_client_;
68 std::unique_ptr<ShillThirdPartyVpnDriverClient> 60 std::unique_ptr<ShillThirdPartyVpnDriverClient>
69 shill_third_party_vpn_driver_client_; 61 shill_third_party_vpn_driver_client_;
70 std::unique_ptr<PermissionBrokerClient> permission_broker_client_; 62 std::unique_ptr<PermissionBrokerClient> permission_broker_client_;
71 std::unique_ptr<SMSClient> sms_client_; 63 std::unique_ptr<SMSClient> sms_client_;
72 std::unique_ptr<SystemClockClient> system_clock_client_; 64 std::unique_ptr<SystemClockClient> system_clock_client_;
73 std::unique_ptr<PowerManagerClient> power_manager_client_; 65 std::unique_ptr<PowerManagerClient> power_manager_client_;
74 std::unique_ptr<SessionManagerClient> session_manager_client_; 66 std::unique_ptr<SessionManagerClient> session_manager_client_;
75 std::unique_ptr<UpdateEngineClient> update_engine_client_; 67 std::unique_ptr<UpdateEngineClient> update_engine_client_;
76 68
77 DISALLOW_COPY_AND_ASSIGN(DBusClientsCommon); 69 DISALLOW_COPY_AND_ASSIGN(DBusClientsCommon);
78 }; 70 };
79 71
80 } // namespace chromeos 72 } // namespace chromeos
81 73
82 #endif // CHROMEOS_DBUS_DBUS_CLIENTS_COMMON_H_ 74 #endif // CHROMEOS_DBUS_DBUS_CLIENTS_COMMON_H_
OLDNEW
« no previous file with comments | « chromeos/dbus/dbus_clients_browser.cc ('k') | chromeos/dbus/dbus_clients_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698