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 // The most important feature of StatusController is the | 8 // The most important feature of StatusController is the |
9 // ScopedModelSafeGroupRestriction. Some of its functions expose per-thread | 9 // ScopedModelSafeGroupRestriction. Some of its functions expose per-thread |
10 // state, and can be called only when the restriction is in effect. For | 10 // state, and can be called only when the restriction is in effect. For |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 void set_sync_protocol_error(const SyncProtocolError& error); | 134 void set_sync_protocol_error(const SyncProtocolError& error); |
135 void set_last_get_key_result(const SyncerError result); | 135 void set_last_get_key_result(const SyncerError result); |
136 void set_last_download_updates_result(const SyncerError result); | 136 void set_last_download_updates_result(const SyncerError result); |
137 void set_commit_result(const SyncerError result); | 137 void set_commit_result(const SyncerError result); |
138 | 138 |
139 // A very important flag used to inform frontend of need to migrate. | 139 // A very important flag used to inform frontend of need to migrate. |
140 void set_types_needing_local_migration(ModelTypeSet types); | 140 void set_types_needing_local_migration(ModelTypeSet types); |
141 | 141 |
142 void UpdateStartTime(); | 142 void UpdateStartTime(); |
143 | 143 |
144 void set_debug_info_sent(); | |
145 | |
146 bool debug_info_sent() const; | |
147 | |
148 private: | 144 private: |
149 friend class ScopedModelSafeGroupRestriction; | 145 friend class ScopedModelSafeGroupRestriction; |
150 | 146 |
151 ModelNeutralState model_neutral_; | 147 ModelNeutralState model_neutral_; |
152 | 148 |
153 // Used to fail read/write operations on state that don't obey the current | 149 // Used to fail read/write operations on state that don't obey the current |
154 // active ModelSafeWorker contract. | 150 // active ModelSafeWorker contract. |
155 bool group_restriction_in_effect_; | 151 bool group_restriction_in_effect_; |
156 ModelSafeGroup group_restriction_; | 152 ModelSafeGroup group_restriction_; |
157 | 153 |
(...skipping 19 matching lines...) Expand all Loading... |
177 } | 173 } |
178 private: | 174 private: |
179 StatusController* status_; | 175 StatusController* status_; |
180 DISALLOW_COPY_AND_ASSIGN(ScopedModelSafeGroupRestriction); | 176 DISALLOW_COPY_AND_ASSIGN(ScopedModelSafeGroupRestriction); |
181 }; | 177 }; |
182 | 178 |
183 } // namespace sessions | 179 } // namespace sessions |
184 } // namespace syncer | 180 } // namespace syncer |
185 | 181 |
186 #endif // SYNC_SESSIONS_STATUS_CONTROLLER_H_ | 182 #endif // SYNC_SESSIONS_STATUS_CONTROLLER_H_ |
OLD | NEW |