Index: chromeos/dbus/dbus_thread_manager.h |
diff --git a/chromeos/dbus/dbus_thread_manager.h b/chromeos/dbus/dbus_thread_manager.h |
index 2a5e335bf056327c13a7134190d43c2f9cf3bddd..053763c984d0854b2b56150db1755e7d0dac341d 100644 |
--- a/chromeos/dbus/dbus_thread_manager.h |
+++ b/chromeos/dbus/dbus_thread_manager.h |
@@ -9,6 +9,7 @@ |
#include "base/memory/ref_counted.h" |
#include "base/memory/scoped_ptr.h" |
#include "chromeos/chromeos_export.h" |
+#include "chromeos/dbus/dbus_client_bundle.h" |
namespace base { |
class Thread; |
@@ -114,6 +115,9 @@ class CHROMEOS_EXPORT DBusThreadManager { |
// Gets the global instance. Initialize() must be called first. |
static DBusThreadManager* Get(); |
+ // Returns true if |client| is stubbed. |
+ static bool IsUsingStub(DBusClientBundle::DBusClientType client); |
+ |
// Returns various D-Bus bus instances, owned by DBusThreadManager. |
virtual dbus::Bus* GetSystemBus() = 0; |
@@ -163,6 +167,13 @@ class CHROMEOS_EXPORT DBusThreadManager { |
DBusThreadManager(); |
private: |
+ // Initialize global thread manager instance. |
+ static void InitializeRegular(); |
+ |
+ // Initialize with stub implementations for only certain clients that are |
+ // not included in comma-separated |unstub_clients| list. |
+ static void InitializeWithPartialStub(const std::string& unstub_clients); |
+ |
// InitializeClients is called after g_dbus_thread_manager is set. |
// NOTE: Clients that access other clients in their Init() must be |
// initialized in the correct order. |
@@ -171,6 +182,10 @@ class CHROMEOS_EXPORT DBusThreadManager { |
// Initializes |client| with the |system_bus_|. |
static void InitClient(DBusClient* client); |
+ // Bitmask that defines which dbus clients are not stubbed out. Bitmap flags |
+ // are defined within DBusClientBundle::DBusClientType enum. |
+ static DBusClientBundle::DBusClientTypeMask unstub_client_mask_; |
+ |
DISALLOW_COPY_AND_ASSIGN(DBusThreadManager); |
}; |