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

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

Issue 9702083: sync: Count and report reflected updates (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update python test server 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/status_controller.h" 5 #include "sync/sessions/status_controller.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "sync/protocol/sync_protocol_error.h" 10 #include "sync/protocol/sync_protocol_error.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 syncable::ModelTypeSet types) { 109 syncable::ModelTypeSet types) {
110 shared_.syncer_status.mutate()->types_needing_local_migration = types; 110 shared_.syncer_status.mutate()->types_needing_local_migration = types;
111 } 111 }
112 112
113 void StatusController::increment_num_tombstone_updates_downloaded_by( 113 void StatusController::increment_num_tombstone_updates_downloaded_by(
114 int value) { 114 int value) {
115 shared_.syncer_status.mutate()->num_tombstone_updates_downloaded_total += 115 shared_.syncer_status.mutate()->num_tombstone_updates_downloaded_total +=
116 value; 116 value;
117 } 117 }
118 118
119 void StatusController::increment_num_reflected_updates_downloaded_by(
120 int value) {
121 shared_.syncer_status.mutate()->num_reflected_updates_downloaded_total +=
122 value;
123 }
124
119 void StatusController::set_num_server_changes_remaining( 125 void StatusController::set_num_server_changes_remaining(
120 int64 changes_remaining) { 126 int64 changes_remaining) {
121 if (shared_.num_server_changes_remaining.value() != changes_remaining) 127 if (shared_.num_server_changes_remaining.value() != changes_remaining)
122 *(shared_.num_server_changes_remaining.mutate()) = changes_remaining; 128 *(shared_.num_server_changes_remaining.mutate()) = changes_remaining;
123 } 129 }
124 130
125 void StatusController::set_invalid_store(bool invalid_store) { 131 void StatusController::set_invalid_store(bool invalid_store) {
126 if (shared_.syncer_status.value().invalid_store != invalid_store) 132 if (shared_.syncer_status.value().invalid_store != invalid_store)
127 shared_.syncer_status.mutate()->invalid_store = invalid_store; 133 shared_.syncer_status.mutate()->invalid_store = invalid_store;
128 } 134 }
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 void StatusController::set_debug_info_sent() { 307 void StatusController::set_debug_info_sent() {
302 shared_.control_params.debug_info_sent = true; 308 shared_.control_params.debug_info_sent = true;
303 } 309 }
304 310
305 bool StatusController::debug_info_sent() const { 311 bool StatusController::debug_info_sent() const {
306 return shared_.control_params.debug_info_sent; 312 return shared_.control_params.debug_info_sent;
307 } 313 }
308 314
309 } // namespace sessions 315 } // namespace sessions
310 } // namespace browser_sync 316 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698