OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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. | 6 // state tracking on behalf of a SyncSession. |
7 // | 7 // |
8 // This object may be accessed from many different threads. It will be accessed | 8 // This object may be accessed from many different threads. It will be accessed |
9 // most often from the syncer thread. However, when update application is in | 9 // most often from the syncer thread. However, when update application is in |
10 // progress it may also be accessed from the worker threads. This is safe | 10 // progress it may also be accessed from the worker threads. This is safe |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 // Commit counters. | 89 // Commit counters. |
90 void increment_num_successful_commits(); | 90 void increment_num_successful_commits(); |
91 void increment_num_successful_bookmark_commits(); | 91 void increment_num_successful_bookmark_commits(); |
92 void set_num_successful_bookmark_commits(int value); | 92 void set_num_successful_bookmark_commits(int value); |
93 | 93 |
94 // Server communication status tracking. | 94 // Server communication status tracking. |
95 void set_last_get_key_result(const SyncerError result); | 95 void set_last_get_key_result(const SyncerError result); |
96 void set_last_download_updates_result(const SyncerError result); | 96 void set_last_download_updates_result(const SyncerError result); |
97 void set_commit_result(const SyncerError result); | 97 void set_commit_result(const SyncerError result); |
98 | 98 |
99 // A very important flag used to inform frontend of need to migrate. | |
100 void set_types_needing_local_migration(ModelTypeSet types); | |
101 | |
102 void UpdateStartTime(); | 99 void UpdateStartTime(); |
103 | 100 |
104 private: | 101 private: |
105 ModelNeutralState model_neutral_; | 102 ModelNeutralState model_neutral_; |
106 | 103 |
107 base::Time sync_start_time_; | 104 base::Time sync_start_time_; |
108 | 105 |
109 DISALLOW_COPY_AND_ASSIGN(StatusController); | 106 DISALLOW_COPY_AND_ASSIGN(StatusController); |
110 }; | 107 }; |
111 | 108 |
112 } // namespace sessions | 109 } // namespace sessions |
113 } // namespace syncer | 110 } // namespace syncer |
114 | 111 |
115 #endif // SYNC_SESSIONS_STATUS_CONTROLLER_H_ | 112 #endif // SYNC_SESSIONS_STATUS_CONTROLLER_H_ |
OLD | NEW |