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

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: Rebase Created 8 years, 5 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 136
137 void StatusController::increment_num_server_overwrites() { 137 void StatusController::increment_num_server_overwrites() {
138 model_neutral_.num_server_overwrites++; 138 model_neutral_.num_server_overwrites++;
139 } 139 }
140 140
141 void StatusController::set_sync_protocol_error( 141 void StatusController::set_sync_protocol_error(
142 const SyncProtocolError& error) { 142 const SyncProtocolError& error) {
143 model_neutral_.sync_protocol_error = error; 143 model_neutral_.sync_protocol_error = error;
144 } 144 }
145 145
146 void StatusController::set_last_get_key_result(const SyncerError result) {
147 model_neutral_.last_get_key_result = result;
148 }
149
146 void StatusController::set_last_download_updates_result( 150 void StatusController::set_last_download_updates_result(
147 const SyncerError result) { 151 const SyncerError result) {
148 model_neutral_.last_download_updates_result = result; 152 model_neutral_.last_download_updates_result = result;
149 } 153 }
150 154
151 void StatusController::set_commit_result(const SyncerError result) { 155 void StatusController::set_commit_result(const SyncerError result) {
152 model_neutral_.commit_result = result; 156 model_neutral_.commit_result = result;
153 } 157 }
154 158
159 SyncerError StatusController::last_get_key_result() const {
160 return model_neutral_.last_get_key_result;
161 }
162
155 void StatusController::update_conflicts_resolved(bool resolved) { 163 void StatusController::update_conflicts_resolved(bool resolved) {
156 model_neutral_.conflicts_resolved |= resolved; 164 model_neutral_.conflicts_resolved |= resolved;
157 } 165 }
158 void StatusController::reset_conflicts_resolved() { 166 void StatusController::reset_conflicts_resolved() {
159 model_neutral_.conflicts_resolved = false; 167 model_neutral_.conflicts_resolved = false;
160 } 168 }
161 169
162 // Returns the number of updates received from the sync server. 170 // Returns the number of updates received from the sync server.
163 int64 StatusController::CountUpdates() const { 171 int64 StatusController::CountUpdates() const {
164 const sync_pb::ClientToServerResponse& updates = 172 const sync_pb::ClientToServerResponse& updates =
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 void StatusController::set_debug_info_sent() { 269 void StatusController::set_debug_info_sent() {
262 model_neutral_.debug_info_sent = true; 270 model_neutral_.debug_info_sent = true;
263 } 271 }
264 272
265 bool StatusController::debug_info_sent() const { 273 bool StatusController::debug_info_sent() const {
266 return model_neutral_.debug_info_sent; 274 return model_neutral_.debug_info_sent;
267 } 275 }
268 276
269 } // namespace sessions 277 } // namespace sessions
270 } // namespace syncer 278 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698