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 // The 'sessions' namespace comprises all the pieces of state that are | 5 // The 'sessions' namespace comprises all the pieces of state that are |
6 // combined to form a SyncSession instance. In that way, it can be thought of | 6 // combined to form a SyncSession instance. In that way, it can be thought of |
7 // as an extension of the SyncSession type itself. Session scoping gives | 7 // as an extension of the SyncSession type itself. Session scoping gives |
8 // context to things like "conflict progress", "update progress", etc, and the | 8 // context to things like "conflict progress", "update progress", etc, and the |
9 // separation this file provides allows clients to only include the parts they | 9 // separation this file provides allows clients to only include the parts they |
10 // need rather than the entire session stack. | 10 // need rather than the entire session stack. |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 private: | 251 private: |
252 // Container for updates that passed verification. | 252 // Container for updates that passed verification. |
253 std::vector<VerifiedUpdate> verified_updates_; | 253 std::vector<VerifiedUpdate> verified_updates_; |
254 | 254 |
255 // Stores the result of the various ApplyUpdate attempts we've made. | 255 // Stores the result of the various ApplyUpdate attempts we've made. |
256 // May contain duplicate entries. | 256 // May contain duplicate entries. |
257 std::vector<AppliedUpdate> applied_updates_; | 257 std::vector<AppliedUpdate> applied_updates_; |
258 }; | 258 }; |
259 | 259 |
260 struct SyncCycleControlParameters { | 260 struct SyncCycleControlParameters { |
261 SyncCycleControlParameters() : conflict_sets_built(false), | 261 SyncCycleControlParameters() : conflicts_resolved(false), |
262 conflicts_resolved(false), | |
263 items_committed(false), | 262 items_committed(false), |
264 debug_info_sent(false) {} | 263 debug_info_sent(false) {} |
265 // Set to true by BuildAndProcessConflictSetsCommand if the RESOLVE_CONFLICTS | |
266 // step is needed. | |
267 bool conflict_sets_built; | |
268 | |
269 // Set to true by ResolveConflictsCommand if any forward progress was made. | 264 // Set to true by ResolveConflictsCommand if any forward progress was made. |
270 bool conflicts_resolved; | 265 bool conflicts_resolved; |
271 | 266 |
272 // Set to true by PostCommitMessageCommand if any commits were successful. | 267 // Set to true by PostCommitMessageCommand if any commits were successful. |
273 bool items_committed; | 268 bool items_committed; |
274 | 269 |
275 // True indicates debug info has been sent once this session. | 270 // True indicates debug info has been sent once this session. |
276 bool debug_info_sent; | 271 bool debug_info_sent; |
277 }; | 272 }; |
278 | 273 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 ~PerModelSafeGroupState(); | 325 ~PerModelSafeGroupState(); |
331 | 326 |
332 UpdateProgress update_progress; | 327 UpdateProgress update_progress; |
333 ConflictProgress conflict_progress; | 328 ConflictProgress conflict_progress; |
334 }; | 329 }; |
335 | 330 |
336 } // namespace sessions | 331 } // namespace sessions |
337 } // namespace browser_sync | 332 } // namespace browser_sync |
338 | 333 |
339 #endif // CHROME_BROWSER_SYNC_SESSIONS_SESSION_STATE_H_ | 334 #endif // CHROME_BROWSER_SYNC_SESSIONS_SESSION_STATE_H_ |
OLD | NEW |