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

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

Issue 7861013: Fix the false-positive detection of commit errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another attempt at detecting errors Created 9 years, 2 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/sync/sessions/status_controller.h" 5 #include "chrome/browser/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 "chrome/browser/sync/protocol/sync_protocol_error.h" 10 #include "chrome/browser/sync/protocol/sync_protocol_error.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 147
148 void StatusController::increment_num_local_overwrites() { 148 void StatusController::increment_num_local_overwrites() {
149 shared_.syncer_status.mutate()->num_local_overwrites++; 149 shared_.syncer_status.mutate()->num_local_overwrites++;
150 } 150 }
151 151
152 void StatusController::increment_num_server_overwrites() { 152 void StatusController::increment_num_server_overwrites() {
153 shared_.syncer_status.mutate()->num_server_overwrites++; 153 shared_.syncer_status.mutate()->num_server_overwrites++;
154 } 154 }
155 155
156 void StatusController::set_sync_protocol_error( 156 void StatusController::set_sync_protocol_error(
157 const SyncProtocolError& error) { 157 const SyncOperationResult& error) {
158 shared_.error.mutate()->sync_protocol_error = error; 158 shared_.error.mutate()->sync_protocol_error = error;
159 } 159 }
160 160
161 void StatusController::set_commit_set(const OrderedCommitSet& commit_set) { 161 void StatusController::set_commit_set(const OrderedCommitSet& commit_set) {
162 DCHECK(!group_restriction_in_effect_); 162 DCHECK(!group_restriction_in_effect_);
163 shared_.commit_set = commit_set; 163 shared_.commit_set = commit_set;
164 } 164 }
165 165
166 void StatusController::update_conflict_sets_built(bool built) { 166 void StatusController::update_conflict_sets_built(bool built) {
167 shared_.control_params.conflict_sets_built |= built; 167 shared_.control_params.conflict_sets_built |= built;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 NOTREACHED(); // Server should always send changes remaining. 237 NOTREACHED(); // Server should always send changes remaining.
238 return false; // Avoid looping forever. 238 return false; // Avoid looping forever.
239 } 239 }
240 // Changes remaining is an estimate, but if it's estimated to be 240 // Changes remaining is an estimate, but if it's estimated to be
241 // zero, that's firm and we don't have to ask again. 241 // zero, that's firm and we don't have to ask again.
242 return updates_response().get_updates().changes_remaining() == 0; 242 return updates_response().get_updates().changes_remaining() == 0;
243 } 243 }
244 244
245 } // namespace sessions 245 } // namespace sessions
246 } // namespace browser_sync 246 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/sessions/status_controller.h ('k') | chrome/browser/sync/sessions/sync_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698