diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-01 01:43:50 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-01 01:43:50 +0000 |
commit | fa47d417b3cc82316ec3d1ce36ffe57558614bf5 (patch) | |
tree | 73906bbe871319daa75492aa6662e52875c66576 | |
parent | 938062f1879d192b9fcead0c1bd0677fb53ee887 (diff) | |
download | chromium_src-fa47d417b3cc82316ec3d1ce36ffe57558614bf5.zip chromium_src-fa47d417b3cc82316ec3d1ce36ffe57558614bf5.tar.gz chromium_src-fa47d417b3cc82316ec3d1ce36ffe57558614bf5.tar.bz2 |
Added checks for server-issued notifications.
BUG=34647
TEST=manual
Review URL: http://codereview.chromium.org/2835028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51331 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/sync/engine/syncapi.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome/browser/sync/engine/syncapi.cc b/chrome/browser/sync/engine/syncapi.cc index 1fbb4ed..b388042 100644 --- a/chrome/browser/sync/engine/syncapi.cc +++ b/chrome/browser/sync/engine/syncapi.cc @@ -2021,9 +2021,11 @@ void SyncManager::SyncInternal::TalkMediatorLogin( void SyncManager::SyncInternal::OnIncomingNotification( const IncomingNotificationData& notification_data) { - // Check if the service url is a sync URL. An empty service URL - // is treated as a legacy sync notification - if (notification_data.service_url.empty() || + // Check if the service url is a sync URL. An empty service URL is + // treated as a legacy sync notification. If we're listening to + // server-issued notifications, no need to check the service_url. + if ((notification_method_ == browser_sync::NOTIFICATION_SERVER) || + notification_data.service_url.empty() || (notification_data.service_url == browser_sync::kSyncLegacyServiceUrl) || (notification_data.service_url == @@ -2040,6 +2042,7 @@ void SyncManager::SyncInternal::OnIncomingNotification( } void SyncManager::SyncInternal::OnOutgoingNotification() { + DCHECK_NE(notification_method_, browser_sync::NOTIFICATION_SERVER); allstatus_.IncrementNotificationsSent(); } |