| 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 | 235 |
| 236 if (!updates_response().get_updates().has_changes_remaining()) { | 236 if (!updates_response().get_updates().has_changes_remaining()) { |
| 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 bool StatusController::ResponseContainsUpdates() const { |
| 246 return updates_response().get_updates().entries_size() != 0; |
| 247 } |
| 248 |
| 245 void StatusController::set_debug_info_sent() { | 249 void StatusController::set_debug_info_sent() { |
| 246 shared_.control_params.debug_info_sent = true; | 250 shared_.control_params.debug_info_sent = true; |
| 247 } | 251 } |
| 248 | 252 |
| 249 bool StatusController::debug_info_sent() { | 253 bool StatusController::debug_info_sent() { |
| 250 return shared_.control_params.debug_info_sent; | 254 return shared_.control_params.debug_info_sent; |
| 251 } | 255 } |
| 252 | 256 |
| 253 } // namespace sessions | 257 } // namespace sessions |
| 254 } // namespace browser_sync | 258 } // namespace browser_sync |
| OLD | NEW |