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 // StatusController handles all counter and status related number crunching and | 5 // StatusController handles all counter and status related number crunching and |
6 // state tracking on behalf of a SyncSession. It 'controls' the model data | 6 // state tracking on behalf of a SyncSession. It 'controls' the model data |
7 // defined in session_state.h. The most important feature of StatusController | 7 // defined in session_state.h. The most important feature of StatusController |
8 // is the ScopedModelSafetyRestriction. When one of these is active, the | 8 // is the ScopedModelSafetyRestriction. When one of these is active, the |
9 // underlying data set exposed via accessors is swapped out to the appropriate | 9 // underlying data set exposed via accessors is swapped out to the appropriate |
10 // set for the restricted ModelSafeGroup behind the scenes. For example, if | 10 // set for the restricted ModelSafeGroup behind the scenes. For example, if |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 } | 207 } |
208 | 208 |
209 // A toolbelt full of methods for updating counters and flags. | 209 // A toolbelt full of methods for updating counters and flags. |
210 void set_num_server_changes_remaining(int64 changes_remaining); | 210 void set_num_server_changes_remaining(int64 changes_remaining); |
211 void set_invalid_store(bool invalid_store); | 211 void set_invalid_store(bool invalid_store); |
212 void set_num_successful_bookmark_commits(int value); | 212 void set_num_successful_bookmark_commits(int value); |
213 void increment_num_successful_commits(); | 213 void increment_num_successful_commits(); |
214 void increment_num_successful_bookmark_commits(); | 214 void increment_num_successful_bookmark_commits(); |
215 void increment_num_updates_downloaded_by(int value); | 215 void increment_num_updates_downloaded_by(int value); |
216 void increment_num_tombstone_updates_downloaded_by(int value); | 216 void increment_num_tombstone_updates_downloaded_by(int value); |
| 217 void increment_num_reflected_updates_downloaded_by(int value); |
217 void set_types_needing_local_migration(syncable::ModelTypeSet types); | 218 void set_types_needing_local_migration(syncable::ModelTypeSet types); |
218 void set_unsynced_handles(const std::vector<int64>& unsynced_handles); | 219 void set_unsynced_handles(const std::vector<int64>& unsynced_handles); |
219 void increment_num_local_overwrites(); | 220 void increment_num_local_overwrites(); |
220 void increment_num_server_overwrites(); | 221 void increment_num_server_overwrites(); |
221 void set_sync_protocol_error(const SyncProtocolError& error); | 222 void set_sync_protocol_error(const SyncProtocolError& error); |
222 void set_last_download_updates_result(const SyncerError result); | 223 void set_last_download_updates_result(const SyncerError result); |
223 void set_last_post_commit_result(const SyncerError result); | 224 void set_last_post_commit_result(const SyncerError result); |
224 void set_last_process_commit_response_result(const SyncerError result); | 225 void set_last_process_commit_response_result(const SyncerError result); |
225 | 226 |
226 void set_commit_set(const OrderedCommitSet& commit_set); | 227 void set_commit_set(const OrderedCommitSet& commit_set); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 } | 289 } |
289 private: | 290 private: |
290 StatusController* status_; | 291 StatusController* status_; |
291 DISALLOW_COPY_AND_ASSIGN(ScopedModelSafeGroupRestriction); | 292 DISALLOW_COPY_AND_ASSIGN(ScopedModelSafeGroupRestriction); |
292 }; | 293 }; |
293 | 294 |
294 } | 295 } |
295 } | 296 } |
296 | 297 |
297 #endif // SYNC_SESSIONS_STATUS_CONTROLLER_H_ | 298 #endif // SYNC_SESSIONS_STATUS_CONTROLLER_H_ |
OLD | NEW |