| 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 "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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 int64 changes_remaining) { | 151 int64 changes_remaining) { |
| 152 if (shared_.num_server_changes_remaining.value() != changes_remaining) | 152 if (shared_.num_server_changes_remaining.value() != changes_remaining) |
| 153 *(shared_.num_server_changes_remaining.mutate()) = changes_remaining; | 153 *(shared_.num_server_changes_remaining.mutate()) = changes_remaining; |
| 154 } | 154 } |
| 155 | 155 |
| 156 void StatusController::set_invalid_store(bool invalid_store) { | 156 void StatusController::set_invalid_store(bool invalid_store) { |
| 157 if (shared_.syncer_status.value().invalid_store != invalid_store) | 157 if (shared_.syncer_status.value().invalid_store != invalid_store) |
| 158 shared_.syncer_status.mutate()->invalid_store = invalid_store; | 158 shared_.syncer_status.mutate()->invalid_store = invalid_store; |
| 159 } | 159 } |
| 160 | 160 |
| 161 void StatusController::set_syncer_stuck(bool syncer_stuck) { | |
| 162 if (shared_.syncer_status.value().syncer_stuck != syncer_stuck) | |
| 163 shared_.syncer_status.mutate()->syncer_stuck = syncer_stuck; | |
| 164 } | |
| 165 | |
| 166 void StatusController::UpdateStartTime() { | 161 void StatusController::UpdateStartTime() { |
| 167 sync_start_time_ = base::Time::Now(); | 162 sync_start_time_ = base::Time::Now(); |
| 168 } | 163 } |
| 169 | 164 |
| 170 void StatusController::set_num_successful_bookmark_commits(int value) { | 165 void StatusController::set_num_successful_bookmark_commits(int value) { |
| 171 if (shared_.syncer_status.value().num_successful_bookmark_commits != value) | 166 if (shared_.syncer_status.value().num_successful_bookmark_commits != value) |
| 172 shared_.syncer_status.mutate()->num_successful_bookmark_commits = value; | 167 shared_.syncer_status.mutate()->num_successful_bookmark_commits = value; |
| 173 } | 168 } |
| 174 | 169 |
| 175 void StatusController::set_unsynced_handles( | 170 void StatusController::set_unsynced_handles( |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 void StatusController::set_debug_info_sent() { | 307 void StatusController::set_debug_info_sent() { |
| 313 shared_.control_params.debug_info_sent = true; | 308 shared_.control_params.debug_info_sent = true; |
| 314 } | 309 } |
| 315 | 310 |
| 316 bool StatusController::debug_info_sent() const { | 311 bool StatusController::debug_info_sent() const { |
| 317 return shared_.control_params.debug_info_sent; | 312 return shared_.control_params.debug_info_sent; |
| 318 } | 313 } |
| 319 | 314 |
| 320 } // namespace sessions | 315 } // namespace sessions |
| 321 } // namespace browser_sync | 316 } // namespace browser_sync |
| OLD | NEW |