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); |