| Index: chromeos/dbus/dbus_thread_manager.h
|
| diff --git a/chromeos/dbus/dbus_thread_manager.h b/chromeos/dbus/dbus_thread_manager.h
|
| index a66e90496b11d424814beaea07015d02501e3f7b..e573e8951c3a784ea28aeb9b72fd6cf1a16aed66 100644
|
| --- a/chromeos/dbus/dbus_thread_manager.h
|
| +++ b/chromeos/dbus/dbus_thread_manager.h
|
| @@ -86,6 +86,8 @@ class CHROMEOS_EXPORT DBusThreadManager {
|
| // Sets the global instance. Must be called before any calls to Get().
|
| // We explicitly initialize and shut down the global object, rather than
|
| // making it a Singleton, to ensure clean startup and shutdown.
|
| + // This will initialize regular or stub DBusClients depending on command-line
|
| + // arguments and whether this process runs in a ChromeOS environment.
|
| static void Initialize();
|
|
|
| // Returns a DBusThreadManagerSetter instance that allows tests to
|
| @@ -104,7 +106,7 @@ class CHROMEOS_EXPORT DBusThreadManager {
|
| static DBusThreadManager* Get();
|
|
|
| // Returns true if |client| is stubbed.
|
| - static bool IsUsingStub(DBusClientBundle::DBusClientType client);
|
| + bool IsUsingStub(DBusClientBundle::DBusClientType client);
|
|
|
| // Returns various D-Bus bus instances, owned by DBusThreadManager.
|
| dbus::Bus* GetSystemBus();
|
| @@ -151,12 +153,15 @@ class CHROMEOS_EXPORT DBusThreadManager {
|
| private:
|
| friend class DBusThreadManagerSetter;
|
|
|
| - DBusThreadManager();
|
| + // Creates a new DBusThreadManager using the DBusClients set in
|
| + // |client_bundle|.
|
| + DBusThreadManager(scoped_ptr<DBusClientBundle> client_bundle);
|
| ~DBusThreadManager();
|
|
|
| // Creates a global instance of DBusThreadManager. Can not be called more
|
| // than once.
|
| - static void CreateGlobalInstance();
|
| + static void CreateGlobalInstance(
|
| + DBusClientBundle::DBusClientTypeMask unstub_client_mask);
|
|
|
| // Initialize global thread manager instance.
|
| static void InitializeRegular();
|
| @@ -169,18 +174,10 @@ class CHROMEOS_EXPORT DBusThreadManager {
|
| // not included in comma-separated |unstub_clients| list.
|
| static void InitializeWithPartialStub(const std::string& unstub_clients);
|
|
|
| - // Constructs all clients and stores them in the respective *_client_ member
|
| - // variable.
|
| - void CreateDefaultClients();
|
| -
|
| - // Constructs all clients and stores them in the respective *_client_ member
|
| - // variable.
|
| + // Initializes all currently stored DBusClients with the system bus and
|
| + // creates a stub network environment.
|
| void InitializeClients();
|
|
|
| - // Bitmask that defines which dbus clients are not stubbed out. Bitmap flags
|
| - // are defined within DBusClientBundle::DBusClientType enum.
|
| - static DBusClientBundle::DBusClientTypeMask unstub_client_mask_;
|
| -
|
| scoped_ptr<base::Thread> dbus_thread_;
|
| scoped_refptr<dbus::Bus> system_bus_;
|
| scoped_ptr<DBusClientBundle> client_bundle_;
|
|
|