Index: chromeos/dbus/dbus_thread_manager.h |
diff --git a/chromeos/dbus/dbus_thread_manager.h b/chromeos/dbus/dbus_thread_manager.h |
index c980b27f960898f2d19f412e52234a1aee7e399e..65890c4a64362235fa6dca699ef06045b0fbac72 100644 |
--- a/chromeos/dbus/dbus_thread_manager.h |
+++ b/chromeos/dbus/dbus_thread_manager.h |
@@ -83,10 +83,14 @@ class CHROMEOS_EXPORT DBusThreadManager { |
// making it a Singleton, to ensure clean startup and shutdown. |
static void Initialize(); |
- // Similar to Initialize(), but can inject an alternative |
- // DBusThreadManager such as MockDBusThreadManager for testing. |
+ // Sets an alternative DBusThreadManager such as MockDBusThreadManager |
+ // to be used in |Initialize()| for testing. |
// The injected object will be owned by the internal pointer and deleted |
// by Shutdown(). |
+ static void SetInstanceForTesting(DBusThreadManager* dbus_thread_manager); |
satorux1
2013/11/26 01:22:58
It wasn't clear to me why this needed to be introd
oshima
2013/11/26 02:18:43
This should be used in the test that creates a bro
satorux1
2013/11/26 06:52:07
Please add the explanation in the comment.
oshima
2013/11/26 20:46:44
Done.
|
+ |
+ // Similar to Initialize(), but injects an alternative |
+ // DBusThreadManager using SetInstanceForTest first. |
satorux1
2013/11/26 01:22:58
maybe add:
// The injected object will be owned b
oshima
2013/11/26 02:18:43
Do you want to switch to use scoped_ptr instead?
I
satorux1
2013/11/26 06:52:07
Let's keep it as-is for now.
oshima
2013/11/26 20:46:44
Done.
|
static void InitializeForTesting(DBusThreadManager* dbus_thread_manager); |
// Initialize with stub implementations for tests based on stubs. |