Index: jingle/notifier/listener/mediator_thread_impl.h |
diff --git a/jingle/notifier/listener/mediator_thread_impl.h b/jingle/notifier/listener/mediator_thread_impl.h |
index 4015a81f64a4d9c4539c637f4dfffd838a8a3d6c..06567578fc3bc315175bf70724eec661da2a654a 100644 |
--- a/jingle/notifier/listener/mediator_thread_impl.h |
+++ b/jingle/notifier/listener/mediator_thread_impl.h |
@@ -25,6 +25,7 @@ |
#include "base/basictypes.h" |
#include "base/memory/ref_counted.h" |
+#include "base/memory/weak_ptr.h" |
#include "base/task.h" |
#include "jingle/notifier/base/notifier_options.h" |
#include "jingle/notifier/listener/mediator_thread.h" |
@@ -37,6 +38,10 @@ namespace buzz { |
class XmppClientSettings; |
} // namespace buzz |
+namespace talk_base { |
+class Task; |
+} // namespace talk_base |
+ |
namespace notifier { |
class MediatorThreadImpl : public MediatorThread { |
@@ -59,6 +64,11 @@ class MediatorThreadImpl : public MediatorThread { |
virtual void SendNotification(const Notification& data); |
virtual void UpdateXmppSettings(const buzz::XmppClientSettings& settings); |
+ // Used by unit tests. Make sure that tests that use this have the |
+ // IO message loop proxy passed in via |notifier_options| pointing |
+ // to the current thread. |
+ void TriggerOnConnectForTest(base::WeakPtr<talk_base::Task> base_task); |
+ |
private: |
void CheckOrSetValidThread(); |
// The logic of Logout without the thread check so it can be called in the |