diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-14 22:54:11 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-14 22:54:11 +0000 |
commit | 3546fe45a50c012b2d14d3ca2e0d4d361f13b19c (patch) | |
tree | 0de5eadb8ca20604946f11e3d585ba1ecab184f9 /chrome/browser/sync/notifier/chrome_invalidation_client.cc | |
parent | 21a034ee40b4a720ae5613180425338a86748268 (diff) | |
download | chromium_src-3546fe45a50c012b2d14d3ca2e0d4d361f13b19c.zip chromium_src-3546fe45a50c012b2d14d3ca2e0d4d361f13b19c.tar.gz chromium_src-3546fe45a50c012b2d14d3ca2e0d4d361f13b19c.tar.bz2 |
[Sync] Convert notifications for UNKNOWN to notifications for everything
Handle this in ChromeInvalidationClient so that we don't have to handle
it everywhere else.
We were handling it incorrectly anyway, but it wasn't a problem since
we always get all updates for all data types.
BUG=None
TEST=Manual
Review URL: http://codereview.chromium.org/6358001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71507 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/notifier/chrome_invalidation_client.cc')
-rw-r--r-- | chrome/browser/sync/notifier/chrome_invalidation_client.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/browser/sync/notifier/chrome_invalidation_client.cc b/chrome/browser/sync/notifier/chrome_invalidation_client.cc index 4a84d3d..1fe2de0 100644 --- a/chrome/browser/sync/notifier/chrome_invalidation_client.cc +++ b/chrome/browser/sync/notifier/chrome_invalidation_client.cc @@ -126,7 +126,14 @@ void ChromeInvalidationClient::Invalidate( VLOG(1) << "Invalidate: " << InvalidationToString(invalidation); syncable::ModelType model_type; if (ObjectIdToRealModelType(invalidation.object_id(), &model_type)) { - listener_->OnInvalidate(model_type); + // TODO(akalin): This is a hack to make new sync data types work + // with server-issued notifications. Remove this when it's not + // needed anymore. + if (model_type == syncable::UNSPECIFIED) { + listener_->OnInvalidateAll(); + } else { + listener_->OnInvalidate(model_type); + } } else { LOG(WARNING) << "Could not get invalidation model type; " << "invalidating everything"; |