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

Side by Side Diff: sync/sessions/session_state.cc

Issue 9702083: sync: Count and report reflected updates (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit tests Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sync/sessions/session_state.h" 5 #include "sync/sessions/session_state.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 value->Set("types", syncable::ModelTypePayloadMapToValue(types)); 43 value->Set("types", syncable::ModelTypePayloadMapToValue(types));
44 return value; 44 return value;
45 } 45 }
46 46
47 SyncerStatus::SyncerStatus() 47 SyncerStatus::SyncerStatus()
48 : invalid_store(false), 48 : invalid_store(false),
49 num_successful_commits(0), 49 num_successful_commits(0),
50 num_successful_bookmark_commits(0), 50 num_successful_bookmark_commits(0),
51 num_updates_downloaded_total(0), 51 num_updates_downloaded_total(0),
52 num_tombstone_updates_downloaded_total(0), 52 num_tombstone_updates_downloaded_total(0),
53 num_echo_updates_downloaded_total(0),
53 num_local_overwrites(0), 54 num_local_overwrites(0),
54 num_server_overwrites(0) { 55 num_server_overwrites(0) {
55 } 56 }
56 57
57 SyncerStatus::~SyncerStatus() { 58 SyncerStatus::~SyncerStatus() {
58 } 59 }
59 60
60 DictionaryValue* SyncerStatus::ToValue() const { 61 DictionaryValue* SyncerStatus::ToValue() const {
61 DictionaryValue* value = new DictionaryValue(); 62 DictionaryValue* value = new DictionaryValue();
62 value->SetBoolean("invalidStore", invalid_store); 63 value->SetBoolean("invalidStore", invalid_store);
63 value->SetInteger("numSuccessfulCommits", num_successful_commits); 64 value->SetInteger("numSuccessfulCommits", num_successful_commits);
64 value->SetInteger("numSuccessfulBookmarkCommits", 65 value->SetInteger("numSuccessfulBookmarkCommits",
65 num_successful_bookmark_commits); 66 num_successful_bookmark_commits);
66 value->SetInteger("numUpdatesDownloadedTotal", 67 value->SetInteger("numUpdatesDownloadedTotal",
67 num_updates_downloaded_total); 68 num_updates_downloaded_total);
68 value->SetInteger("numTombstoneUpdatesDownloadedTotal", 69 value->SetInteger("numTombstoneUpdatesDownloadedTotal",
69 num_tombstone_updates_downloaded_total); 70 num_tombstone_updates_downloaded_total);
71 value->SetInteger("numEchoUpdatesDownloadedTotal",
72 num_echo_updates_downloaded_total);
70 value->SetInteger("numLocalOverwrites", num_local_overwrites); 73 value->SetInteger("numLocalOverwrites", num_local_overwrites);
71 value->SetInteger("numServerOverwrites", num_server_overwrites); 74 value->SetInteger("numServerOverwrites", num_server_overwrites);
72 return value; 75 return value;
73 } 76 }
74 77
75 DictionaryValue* DownloadProgressMarkersToValue( 78 DictionaryValue* DownloadProgressMarkersToValue(
76 const std::string 79 const std::string
77 (&download_progress_markers)[syncable::MODEL_TYPE_COUNT]) { 80 (&download_progress_markers)[syncable::MODEL_TYPE_COUNT]) {
78 DictionaryValue* value = new DictionaryValue(); 81 DictionaryValue* value = new DictionaryValue();
79 for (int i = syncable::FIRST_REAL_MODEL_TYPE; 82 for (int i = syncable::FIRST_REAL_MODEL_TYPE;
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 320
318 PerModelSafeGroupState::PerModelSafeGroupState(bool* dirty_flag) 321 PerModelSafeGroupState::PerModelSafeGroupState(bool* dirty_flag)
319 : conflict_progress(dirty_flag) { 322 : conflict_progress(dirty_flag) {
320 } 323 }
321 324
322 PerModelSafeGroupState::~PerModelSafeGroupState() { 325 PerModelSafeGroupState::~PerModelSafeGroupState() {
323 } 326 }
324 327
325 } // namespace sessions 328 } // namespace sessions
326 } // namespace browser_sync 329 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698