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

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

Issue 10455012: [Sync] Add support for performing a GetKey on startup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fred's comments Created 8 years, 4 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/internal_api/public/base/model_type.h" 10 #include "sync/internal_api/public/base/model_type.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 135
136 void StatusController::increment_num_server_overwrites() { 136 void StatusController::increment_num_server_overwrites() {
137 model_neutral_.num_server_overwrites++; 137 model_neutral_.num_server_overwrites++;
138 } 138 }
139 139
140 void StatusController::set_sync_protocol_error( 140 void StatusController::set_sync_protocol_error(
141 const SyncProtocolError& error) { 141 const SyncProtocolError& error) {
142 model_neutral_.sync_protocol_error = error; 142 model_neutral_.sync_protocol_error = error;
143 } 143 }
144 144
145 void StatusController::set_last_get_key_result(const SyncerError result) {
146 model_neutral_.last_get_key_result = result;
147 }
148
145 void StatusController::set_last_download_updates_result( 149 void StatusController::set_last_download_updates_result(
146 const SyncerError result) { 150 const SyncerError result) {
147 model_neutral_.last_download_updates_result = result; 151 model_neutral_.last_download_updates_result = result;
148 } 152 }
149 153
150 void StatusController::set_commit_result(const SyncerError result) { 154 void StatusController::set_commit_result(const SyncerError result) {
151 model_neutral_.commit_result = result; 155 model_neutral_.commit_result = result;
152 } 156 }
153 157
158 SyncerError StatusController::last_get_key_result() const {
159 return model_neutral_.last_get_key_result;
160 }
161
154 void StatusController::update_conflicts_resolved(bool resolved) { 162 void StatusController::update_conflicts_resolved(bool resolved) {
155 model_neutral_.conflicts_resolved |= resolved; 163 model_neutral_.conflicts_resolved |= resolved;
156 } 164 }
157 void StatusController::reset_conflicts_resolved() { 165 void StatusController::reset_conflicts_resolved() {
158 model_neutral_.conflicts_resolved = false; 166 model_neutral_.conflicts_resolved = false;
159 } 167 }
160 168
161 // Returns the number of updates received from the sync server. 169 // Returns the number of updates received from the sync server.
162 int64 StatusController::CountUpdates() const { 170 int64 StatusController::CountUpdates() const {
163 const sync_pb::ClientToServerResponse& updates = 171 const sync_pb::ClientToServerResponse& updates =
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 void StatusController::set_debug_info_sent() { 268 void StatusController::set_debug_info_sent() {
261 model_neutral_.debug_info_sent = true; 269 model_neutral_.debug_info_sent = true;
262 } 270 }
263 271
264 bool StatusController::debug_info_sent() const { 272 bool StatusController::debug_info_sent() const {
265 return model_neutral_.debug_info_sent; 273 return model_neutral_.debug_info_sent;
266 } 274 }
267 275
268 } // namespace sessions 276 } // namespace sessions
269 } // namespace syncer 277 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698