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

Unified Diff: sync/internal_api/debug_info_event_listener.cc

Issue 11416126: Track merged nudge sources (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More comments Created 8 years, 1 month 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: 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 a356f847b84e738b2e71f2813f91f0fb29169133..1bd83e42af3d43c3cc1cf5f1660523b43e0d7fae 100644
--- a/sync/internal_api/debug_info_event_listener.cc
+++ b/sync/internal_api/debug_info_event_listener.cc
@@ -43,6 +43,26 @@ void DebugInfoEventListener::OnSyncCycleCompleted(
sync_completed_event_info->mutable_caller_info()->set_notifications_enabled(
snapshot.notifications_enabled());
+ // Log the sources and per-type payloads coalesced into this session.
+ const std::vector<sessions::SyncSourceInfo>& snap_sources =
+ snapshot.debug_info_sources_list();
+ for (std::vector<sessions::SyncSourceInfo>::const_iterator source_iter =
+ snap_sources.begin(); source_iter != snap_sources.end(); ++source_iter) {
+ sync_pb::SourceInfo* pb_source_info =
+ sync_completed_event_info->add_source_info();
+
+ pb_source_info->set_source(source_iter->updates_source);
+
+ for (ModelTypeInvalidationMap::const_iterator type_iter =
+ source_iter->types.begin();
+ type_iter != source_iter->types.end(); ++type_iter) {
+ sync_pb::TypeHint* pb_type_hint = pb_source_info->add_type_hint();
+ pb_type_hint->set_data_type_id(
+ GetSpecificsFieldNumberFromModelType(type_iter->first));
+ pb_type_hint->set_has_valid_hint(!type_iter->second.payload.empty());
+ }
+ }
+
AddEventToQueue(event_info);
}
« no previous file with comments | « no previous file | sync/internal_api/js_sync_manager_observer_unittest.cc » ('j') | sync/protocol/client_debug_info.proto » ('J')

Powered by Google App Engine
This is Rietveld 408576698