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

Unified Diff: chrome/browser/sync/notifier/sync_notifier_factory.cc

Issue 7745040: [Sync] Make P2PNotifier behave more like InvalidationNotifier (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
Index: chrome/browser/sync/notifier/sync_notifier_factory.cc
diff --git a/chrome/browser/sync/notifier/sync_notifier_factory.cc b/chrome/browser/sync/notifier/sync_notifier_factory.cc
index d006a942d222fd4bc69ead1cb86ca990d56ce8eb..635d390beddfd343009450b79e576e15a0fec0ba 100644
--- a/chrome/browser/sync/notifier/sync_notifier_factory.cc
+++ b/chrome/browser/sync/notifier/sync_notifier_factory.cc
@@ -17,6 +17,8 @@
#include "content/browser/browser_thread.h"
#include "jingle/notifier/base/const_communicator.h"
#include "jingle/notifier/base/notifier_options.h"
+#include "jingle/notifier/listener/mediator_thread_impl.h"
+#include "jingle/notifier/listener/talk_mediator_impl.h"
#include "net/base/host_port_pair.h"
namespace sync_notifier {
@@ -90,7 +92,12 @@ SyncNotifier* CreateDefaultSyncNotifier(
}
if (notifier_options.notification_method == notifier::NOTIFICATION_P2P) {
- return new P2PNotifier(notifier_options);
+ notifier::TalkMediator* const talk_mediator =
+ new notifier::TalkMediatorImpl(
+ new notifier::MediatorThreadImpl(notifier_options),
+ notifier_options);
+ // Takes ownership of |talk_mediator|.
+ return new P2PNotifier(talk_mediator);
}
return new NonBlockingInvalidationNotifier(notifier_options, client_info);

Powered by Google App Engine
This is Rietveld 408576698