diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-19 19:20:22 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-19 19:20:22 +0000 |
commit | 88678cc8a0fb86aeaa72cf8a0d96b2caab066f55 (patch) | |
tree | e58d38e7d8c76ad01da39eed7f40c4bec960148d /chrome | |
parent | 28518ef23373bd3f3ccdc469e56e5cfd6b0dec98 (diff) | |
download | chromium_src-88678cc8a0fb86aeaa72cf8a0d96b2caab066f55.zip chromium_src-88678cc8a0fb86aeaa72cf8a0d96b2caab066f55.tar.gz chromium_src-88678cc8a0fb86aeaa72cf8a0d96b2caab066f55.tar.bz2 |
[Sync] Fix race condition in P2PNotifier with sending notifications
Store any notifications sent when not connected and send them on
the next connect.
This fixes a race condition in the sync integration tests exposed
by the new syncer thread.
Make sending of notifications not be blocked on successful subscription.
Disable a failing test in jingle_unittests.
BUG=
TEST=
Review URL: http://codereview.chromium.org/6881042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82140 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/sync/notifier/p2p_notifier.cc | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/chrome/browser/sync/notifier/p2p_notifier.cc b/chrome/browser/sync/notifier/p2p_notifier.cc index 25c3182..46d9a9e 100644 --- a/chrome/browser/sync/notifier/p2p_notifier.cc +++ b/chrome/browser/sync/notifier/p2p_notifier.cc @@ -94,12 +94,7 @@ void P2PNotifier::SendNotification() { notifier::Notification notification; notification.channel = kSyncNotificationChannel; notification.data = kSyncNotificationData; - bool success = talk_mediator_->SendNotification(notification); - if (success) { - VLOG(1) << "Sent XMPP notification"; - } else { - VLOG(1) << "Could not send XMPP notification"; - } + talk_mediator_->SendNotification(notification); } void P2PNotifier::OnNotificationStateChange(bool notifications_enabled) { @@ -115,7 +110,7 @@ void P2PNotifier::OnIncomingNotification( CheckOrSetValidThread(); VLOG(1) << "Sync received P2P notification."; if (notification.channel != kSyncNotificationChannel) { - LOG(WARNING) << "Notification fron unexpected source: " + LOG(WARNING) << "Notification from unexpected source: " << notification.channel; } MaybeEmitNotification(); |