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

Unified Diff: chromeos/dbus/dbus_thread_manager.h

Issue 444263002: Added switch that let us 'un-stub' certain dbus clients. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/dbus/dbus_client_bundle_unittest.cc ('k') | chromeos/dbus/dbus_thread_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « chromeos/dbus/dbus_client_bundle_unittest.cc ('k') | chromeos/dbus/dbus_thread_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698