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

Unified Diff: sync/internal_api/debug_info_event_listener.cc

Issue 10197004: [Sync] Convert SyncSessionSnapshot to a copy-able class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 8 years, 8 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/js_sync_manager_observer.h » ('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 53fc9b1a4e42d22a1eeb1ddb29a96fe4a63bd23b..6b3cd23415d89210e367c988e62943e896a27e1e 100644
--- a/sync/internal_api/debug_info_event_listener.cc
+++ b/sync/internal_api/debug_info_event_listener.cc
@@ -17,31 +17,28 @@ DebugInfoEventListener::~DebugInfoEventListener() {
}
void DebugInfoEventListener::OnSyncCycleCompleted(
- const SyncSessionSnapshot* snapshot) {
- if (!snapshot)
- return;
-
+ const SyncSessionSnapshot& snapshot) {
sync_pb::DebugEventInfo event_info;
sync_pb::SyncCycleCompletedEventInfo* sync_completed_event_info =
event_info.mutable_sync_cycle_completed_event_info();
sync_completed_event_info->set_num_encryption_conflicts(
- snapshot->num_encryption_conflicts);
+ snapshot.num_encryption_conflicts());
sync_completed_event_info->set_num_hierarchy_conflicts(
- snapshot->num_hierarchy_conflicts);
+ snapshot.num_hierarchy_conflicts());
sync_completed_event_info->set_num_simple_conflicts(
- snapshot->num_simple_conflicts);
+ snapshot.num_simple_conflicts());
sync_completed_event_info->set_num_server_conflicts(
- snapshot->num_server_conflicts);
+ snapshot.num_server_conflicts());
sync_completed_event_info->set_num_updates_downloaded(
- snapshot->syncer_status.num_updates_downloaded_total);
+ snapshot.syncer_status().num_updates_downloaded_total);
sync_completed_event_info->set_num_reflected_updates_downloaded(
- snapshot->syncer_status.num_reflected_updates_downloaded_total);
+ snapshot.syncer_status().num_reflected_updates_downloaded_total);
sync_completed_event_info->mutable_caller_info()->set_source(
- snapshot->source.updates_source);
+ snapshot.source().updates_source);
sync_completed_event_info->mutable_caller_info()->set_notifications_enabled(
- snapshot->notifications_enabled);
+ snapshot.notifications_enabled());
AddEventToQueue(event_info);
}
« no previous file with comments | « sync/internal_api/debug_info_event_listener.h ('k') | sync/internal_api/js_sync_manager_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698