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

Unified Diff: sync/internal_api/debug_info_event_listener.cc

Issue 23238005: sync: Remove ModelTypeInvalidationMap (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sort entries in gyp files Created 7 years, 4 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/internal_api/debug_info_event_listener.h ('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 66953d4f63699a44874353fc3b5dca58a7d64cc9..64bbab87ed11d44982088d168a45243595959fe0 100644
--- a/sync/internal_api/debug_info_event_listener.cc
+++ b/sync/internal_api/debug_info_event_listener.cc
@@ -4,6 +4,7 @@
#include "sync/internal_api/debug_info_event_listener.h"
+#include "sync/notifier/object_id_invalidation_map.h"
#include "sync/util/cryptographer.h"
namespace syncer {
@@ -134,14 +135,19 @@ void DebugInfoEventListener::OnNudgeFromDatatype(ModelType datatype) {
}
void DebugInfoEventListener::OnIncomingNotification(
- const ModelTypeInvalidationMap& invalidation_map) {
+ const ObjectIdInvalidationMap& invalidations) {
DCHECK(thread_checker_.CalledOnValidThread());
sync_pb::DebugEventInfo event_info;
- ModelTypeSet types = ModelTypeInvalidationMapToSet(invalidation_map);
-
- for (ModelTypeSet::Iterator it = types.First(); it.Good(); it.Inc()) {
- event_info.add_datatypes_notified_from_server(
- GetSpecificsFieldNumberFromModelType(it.Get()));
+ 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));
+ }
}
AddEventToQueue(event_info);
« no previous file with comments | « sync/internal_api/debug_info_event_listener.h ('k') | sync/internal_api/public/base/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698