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