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

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

Issue 10523003: Refactor following sync commit loop change (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another rebase Created 8 years, 6 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
« no previous file with comments | « sync/sessions/status_controller.h ('k') | sync/sessions/status_controller_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/syncable/model_type.h" 10 #include "sync/internal_api/public/syncable/model_type.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 void StatusController::set_sync_protocol_error( 162 void StatusController::set_sync_protocol_error(
163 const SyncProtocolError& error) { 163 const SyncProtocolError& error) {
164 shared_.error.mutate()->sync_protocol_error = error; 164 shared_.error.mutate()->sync_protocol_error = error;
165 } 165 }
166 166
167 void StatusController::set_last_download_updates_result( 167 void StatusController::set_last_download_updates_result(
168 const SyncerError result) { 168 const SyncerError result) {
169 shared_.error.mutate()->last_download_updates_result = result; 169 shared_.error.mutate()->last_download_updates_result = result;
170 } 170 }
171 171
172 void StatusController::set_last_post_commit_result(const SyncerError result) { 172 void StatusController::set_commit_result(const SyncerError result) {
173 shared_.error.mutate()->last_post_commit_result = result; 173 shared_.error.mutate()->commit_result = result;
174 }
175
176 SyncerError StatusController::last_post_commit_result() const {
177 return shared_.error.value().last_post_commit_result;
178 }
179
180 void StatusController::set_last_process_commit_response_result(
181 const SyncerError result) {
182 shared_.error.mutate()->last_process_commit_response_result = result;
183 }
184
185 SyncerError StatusController::last_process_commit_response_result() const {
186 return shared_.error.value().last_process_commit_response_result;
187 } 174 }
188 175
189 void StatusController::update_conflicts_resolved(bool resolved) { 176 void StatusController::update_conflicts_resolved(bool resolved) {
190 shared_.control_params.conflicts_resolved |= resolved; 177 shared_.control_params.conflicts_resolved |= resolved;
191 } 178 }
192 void StatusController::reset_conflicts_resolved() { 179 void StatusController::reset_conflicts_resolved() {
193 shared_.control_params.conflicts_resolved = false; 180 shared_.control_params.conflicts_resolved = false;
194 } 181 }
195 182
196 // Returns the number of updates received from the sync server. 183 // Returns the number of updates received from the sync server.
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 void StatusController::set_debug_info_sent() { 281 void StatusController::set_debug_info_sent() {
295 shared_.control_params.debug_info_sent = true; 282 shared_.control_params.debug_info_sent = true;
296 } 283 }
297 284
298 bool StatusController::debug_info_sent() const { 285 bool StatusController::debug_info_sent() const {
299 return shared_.control_params.debug_info_sent; 286 return shared_.control_params.debug_info_sent;
300 } 287 }
301 288
302 } // namespace sessions 289 } // namespace sessions
303 } // namespace browser_sync 290 } // namespace browser_sync
OLDNEW
« no previous file with comments | « sync/sessions/status_controller.h ('k') | sync/sessions/status_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698