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

Unified Diff: chrome/browser/sync/profile_sync_service_android.cc

Issue 23441042: Refactor common invalidation framework types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move DEPS rule Created 7 years, 2 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/profile_sync_service_android.cc
diff --git a/chrome/browser/sync/profile_sync_service_android.cc b/chrome/browser/sync/profile_sync_service_android.cc
index a3d58d0658fe554d4366c3b96e714a3197393eec..19f94ec92f41434f3db1c61db3c7fc48a6b487a1 100644
--- a/chrome/browser/sync/profile_sync_service_android.cc
+++ b/chrome/browser/sync/profile_sync_service_android.cc
@@ -105,8 +105,10 @@ void ProfileSyncServiceAndroid::SendNudgeNotification(
invalidation::ObjectId object_id(
object_source,
str_object_id);
+ syncer::ObjectIdInvalidationMap object_ids_with_states;
if (version == ipc::invalidation::Constants::UNKNOWN) {
- version = syncer::Invalidation::kUnknownVersion;
+ object_ids_with_states.Insert(
+ syncer::Invalidation::InitUnknownVersion(object_id));
} else {
ObjectIdVersionMap::iterator it =
max_invalidation_versions_.find(object_id);
@@ -116,13 +118,10 @@ void ProfileSyncServiceAndroid::SendNudgeNotification(
return;
}
max_invalidation_versions_[object_id] = version;
+ object_ids_with_states.Insert(
+ syncer::Invalidation::Init(object_id, version, state));
}
- syncer::ObjectIdSet object_ids;
- object_ids.insert(object_id);
- syncer::ObjectIdInvalidationMap object_ids_with_states =
- syncer::ObjectIdSetToInvalidationMap(object_ids, version, state);
-
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_SYNC_REFRESH_REMOTE,
content::Source<Profile>(profile_),
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host_unittest.cc ('k') | chrome/browser/sync/profile_sync_service_harness.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698