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

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

Issue 10735041: Remove syncproto.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address most comments 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
« 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/base/model_type.h" 10 #include "sync/internal_api/public/base/model_type.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 154
155 void StatusController::update_conflicts_resolved(bool resolved) { 155 void StatusController::update_conflicts_resolved(bool resolved) {
156 model_neutral_.conflicts_resolved |= resolved; 156 model_neutral_.conflicts_resolved |= resolved;
157 } 157 }
158 void StatusController::reset_conflicts_resolved() { 158 void StatusController::reset_conflicts_resolved() {
159 model_neutral_.conflicts_resolved = false; 159 model_neutral_.conflicts_resolved = false;
160 } 160 }
161 161
162 // Returns the number of updates received from the sync server. 162 // Returns the number of updates received from the sync server.
163 int64 StatusController::CountUpdates() const { 163 int64 StatusController::CountUpdates() const {
164 const ClientToServerResponse& updates = model_neutral_.updates_response; 164 const sync_pb::ClientToServerResponse& updates =
165 model_neutral_.updates_response;
165 if (updates.has_get_updates()) { 166 if (updates.has_get_updates()) {
166 return updates.get_updates().entries().size(); 167 return updates.get_updates().entries().size();
167 } else { 168 } else {
168 return 0; 169 return 0;
169 } 170 }
170 } 171 }
171 172
172 bool StatusController::HasConflictingUpdates() const { 173 bool StatusController::HasConflictingUpdates() const {
173 DCHECK(!group_restriction_in_effect_) 174 DCHECK(!group_restriction_in_effect_)
174 << "HasConflictingUpdates applies to all ModelSafeGroups"; 175 << "HasConflictingUpdates applies to all ModelSafeGroups";
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 void StatusController::set_debug_info_sent() { 261 void StatusController::set_debug_info_sent() {
261 model_neutral_.debug_info_sent = true; 262 model_neutral_.debug_info_sent = true;
262 } 263 }
263 264
264 bool StatusController::debug_info_sent() const { 265 bool StatusController::debug_info_sent() const {
265 return model_neutral_.debug_info_sent; 266 return model_neutral_.debug_info_sent;
266 } 267 }
267 268
268 } // namespace sessions 269 } // namespace sessions
269 } // namespace syncer 270 } // namespace syncer
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