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

Unified Diff: sync/internal_api/public/sessions/sync_session_snapshot.cc

Issue 11416126: Track merged nudge sources (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix type ID 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/public/sessions/sync_session_snapshot.cc
diff --git a/sync/internal_api/public/sessions/sync_session_snapshot.cc b/sync/internal_api/public/sessions/sync_session_snapshot.cc
index 5e25da3e762c3b9e66a2ff91bd6a6adb677002c9..a3da0a6e03274ee1cccd731f15de3546617e01ea 100644
--- a/sync/internal_api/public/sessions/sync_session_snapshot.cc
+++ b/sync/internal_api/public/sessions/sync_session_snapshot.cc
@@ -34,6 +34,7 @@ SyncSessionSnapshot::SyncSessionSnapshot(
int num_hierarchy_conflicts,
int num_server_conflicts,
const SyncSourceInfo& source,
+ const std::vector<SyncSourceInfo>& merged_sources_log,
bool notifications_enabled,
size_t num_entries,
base::Time sync_start_time,
@@ -48,6 +49,7 @@ SyncSessionSnapshot::SyncSessionSnapshot(
num_hierarchy_conflicts_(num_hierarchy_conflicts),
num_server_conflicts_(num_server_conflicts),
source_(source),
+ merged_sources_log_(merged_sources_log),
notifications_enabled_(notifications_enabled),
num_entries_(num_entries),
sync_start_time_(sync_start_time),
@@ -92,9 +94,14 @@ DictionaryValue* SyncSessionSnapshot::ToValue() const {
num_server_conflicts_);
value->SetInteger("numEntries", num_entries_);
value->Set("source", source_.ToValue());
+ scoped_ptr<ListValue> sources_list(new ListValue());
+ for (std::vector<SyncSourceInfo>::const_iterator i =
+ merged_sources_log_.begin(); i != merged_sources_log_.end(); ++i) {
+ sources_list->Append(i->ToValue());
+ }
+ value->Set("sourcesList", sources_list.release());
value->SetBoolean("notificationsEnabled", notifications_enabled_);
-
scoped_ptr<DictionaryValue> counter_entries(new DictionaryValue());
for (int i = FIRST_REAL_MODEL_TYPE; i < MODEL_TYPE_COUNT; i++) {
scoped_ptr<DictionaryValue> type_entries(new DictionaryValue());
@@ -155,6 +162,11 @@ SyncSourceInfo SyncSessionSnapshot::source() const {
return source_;
}
+const std::vector<SyncSourceInfo>&
+SyncSessionSnapshot::merged_sources_log() const {
+ return merged_sources_log_;
+}
+
bool SyncSessionSnapshot::notifications_enabled() const {
return notifications_enabled_;
}

Powered by Google App Engine
This is Rietveld 408576698