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

Unified Diff: sync/sessions/nudge_tracker.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
« no previous file with comments | « sync/sessions/data_type_tracker.cc ('k') | sync/sync_internal_api.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/sessions/nudge_tracker.cc
diff --git a/sync/sessions/nudge_tracker.cc b/sync/sessions/nudge_tracker.cc
index 8ec8970ef36b1a3c82a36b4cfc33c689218e64ec..27947476f4622c44cf552000db29fe33359e3a94 100644
--- a/sync/sessions/nudge_tracker.cc
+++ b/sync/sessions/nudge_tracker.cc
@@ -96,16 +96,17 @@ void NudgeTracker::RecordRemoteInvalidation(
const ObjectIdInvalidationMap& invalidation_map) {
updates_source_ = sync_pb::GetUpdatesCallerInfo::NOTIFICATION;
- for (ObjectIdInvalidationMap::const_iterator it = invalidation_map.begin();
- it != invalidation_map.end(); ++it) {
+ ObjectIdSet ids = invalidation_map.GetObjectIds();
+ for (ObjectIdSet::const_iterator it = ids.begin(); it != ids.end(); ++it) {
ModelType type;
- if (!ObjectIdToRealModelType(it->first, &type)) {
+ if (!ObjectIdToRealModelType(*it, &type)) {
NOTREACHED()
- << "Object ID " << ObjectIdToString(it->first)
+ << "Object ID " << ObjectIdToString(*it)
<< " does not map to valid model type";
}
DCHECK(type_trackers_.find(type) != type_trackers_.end());
- type_trackers_[type].RecordRemoteInvalidation(it->second.payload);
+ type_trackers_[type].RecordRemoteInvalidations(
+ invalidation_map.ForObject(*it));
}
}
« no previous file with comments | « sync/sessions/data_type_tracker.cc ('k') | sync/sync_internal_api.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698