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

Unified Diff: sync/internal_api/debug_info_event_listener.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/engine/sync_scheduler_impl.cc ('k') | sync/internal_api/public/base/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/debug_info_event_listener.cc
diff --git a/sync/internal_api/debug_info_event_listener.cc b/sync/internal_api/debug_info_event_listener.cc
index 51e6c0f4d3b239c850908b452bf901bb42f91db6..222fa23d178b8f0cf1f22ca456f2910f83f52b43 100644
--- a/sync/internal_api/debug_info_event_listener.cc
+++ b/sync/internal_api/debug_info_event_listener.cc
@@ -135,19 +135,15 @@ void DebugInfoEventListener::OnNudgeFromDatatype(ModelType datatype) {
}
void DebugInfoEventListener::OnIncomingNotification(
- const ObjectIdInvalidationMap& invalidations) {
+ const ObjectIdInvalidationMap& invalidation_map) {
DCHECK(thread_checker_.CalledOnValidThread());
sync_pb::DebugEventInfo event_info;
- ModelTypeSet types = ObjectIdSetToModelTypeSet(ObjectIdInvalidationMapToSet(
- invalidations));
-
- for (ObjectIdInvalidationMap::const_iterator it = invalidations.begin();
- it != invalidations.end(); ++it) {
- ModelType type = UNSPECIFIED;
- if (ObjectIdToRealModelType(it->first, &type)) {
- event_info.add_datatypes_notified_from_server(
- GetSpecificsFieldNumberFromModelType(type));
- }
+ ModelTypeSet types =
+ ObjectIdSetToModelTypeSet(invalidation_map.GetObjectIds());
+
+ for (ModelTypeSet::Iterator it = types.First(); it.Good(); it.Inc()) {
+ event_info.add_datatypes_notified_from_server(
+ GetSpecificsFieldNumberFromModelType(it.Get()));
}
AddEventToQueue(event_info);
« no previous file with comments | « sync/engine/sync_scheduler_impl.cc ('k') | sync/internal_api/public/base/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698