OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |