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

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

Issue 7753023: [Sync] Add tests for migration triggered by notifications (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments 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
« no previous file with comments | « chrome/browser/sync/notifier/p2p_notifier.h ('k') | chrome/browser/sync/profile_sync_service_harness.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/notifier/p2p_notifier.cc
diff --git a/chrome/browser/sync/notifier/p2p_notifier.cc b/chrome/browser/sync/notifier/p2p_notifier.cc
index 8f8f4e696e5fd79ac76deed6b4b2f64578a8d274..d05e30a01b075bdfadcac01f48162aa15dd9664a 100644
--- a/chrome/browser/sync/notifier/p2p_notifier.cc
+++ b/chrome/browser/sync/notifier/p2p_notifier.cc
@@ -17,9 +17,9 @@
namespace sync_notifier {
-namespace {
+const char* kSyncP2PNotificationChannel = "http://www.google.com/chrome/sync";
-const char kSyncNotificationChannel[] = "http://www.google.com/chrome/sync";
+namespace {
const char kNotifySelf[] = "notifySelf";
const char kNotifyOthers[] = "notifyOthers";
@@ -196,7 +196,7 @@ void P2PNotifier::UpdateCredentials(
}
notifier::Subscription subscription;
- subscription.channel = kSyncNotificationChannel;
+ subscription.channel = kSyncP2PNotificationChannel;
// There may be some subtle issues around case sensitivity of the
// from field, but it doesn't matter too much since this is only
// used in p2p mode (which is only used in testing).
@@ -254,7 +254,7 @@ void P2PNotifier::OnIncomingNotification(
VLOG(1) << "Notifications not enabled -- not emitting notification";
return;
}
- if (notification.channel != kSyncNotificationChannel) {
+ if (notification.channel != kSyncP2PNotificationChannel) {
LOG(WARNING) << "Notification from unexpected source "
<< notification.channel;
}
@@ -293,7 +293,7 @@ void P2PNotifier::SendNotificationData(
const P2PNotificationData& notification_data) {
DCHECK(parent_message_loop_proxy_->BelongsToCurrentThread());
notifier::Notification notification;
- notification.channel = kSyncNotificationChannel;
+ notification.channel = kSyncP2PNotificationChannel;
notification.data = notification_data.ToString();
VLOG(1) << "Sending XMPP notification: " << notification.ToString();
talk_mediator_->SendNotification(notification);
« no previous file with comments | « chrome/browser/sync/notifier/p2p_notifier.h ('k') | chrome/browser/sync/profile_sync_service_harness.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698