OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 // a singleton with respect to model types. | 312 // a singleton with respect to model types. |
313 struct AllModelTypeState { | 313 struct AllModelTypeState { |
314 explicit AllModelTypeState(bool* dirty_flag); | 314 explicit AllModelTypeState(bool* dirty_flag); |
315 ~AllModelTypeState(); | 315 ~AllModelTypeState(); |
316 | 316 |
317 // Commits for all model types are bundled together into a single message. | 317 // Commits for all model types are bundled together into a single message. |
318 ClientToServerMessage commit_message; | 318 ClientToServerMessage commit_message; |
319 ClientToServerResponse commit_response; | 319 ClientToServerResponse commit_response; |
320 // We GetUpdates for some combination of types at once. | 320 // We GetUpdates for some combination of types at once. |
321 // requested_update_types stores the set of types which were requested. | 321 // requested_update_types stores the set of types which were requested. |
322 syncable::ModelTypeBitSet updates_request_types; | 322 syncable::ModelEnumSet updates_request_types; |
323 ClientToServerResponse updates_response; | 323 ClientToServerResponse updates_response; |
324 // Used to build the shared commit message. | 324 // Used to build the shared commit message. |
325 DirtyOnWrite<std::vector<int64> > unsynced_handles; | 325 DirtyOnWrite<std::vector<int64> > unsynced_handles; |
326 DirtyOnWrite<SyncerStatus> syncer_status; | 326 DirtyOnWrite<SyncerStatus> syncer_status; |
327 DirtyOnWrite<ErrorCounters> error; | 327 DirtyOnWrite<ErrorCounters> error; |
328 SyncCycleControlParameters control_params; | 328 SyncCycleControlParameters control_params; |
329 DirtyOnWrite<int64> num_server_changes_remaining; | 329 DirtyOnWrite<int64> num_server_changes_remaining; |
330 OrderedCommitSet commit_set; | 330 OrderedCommitSet commit_set; |
331 }; | 331 }; |
332 | 332 |
333 // Grouping of all state that applies to a single ModelSafeGroup. | 333 // Grouping of all state that applies to a single ModelSafeGroup. |
334 struct PerModelSafeGroupState { | 334 struct PerModelSafeGroupState { |
335 explicit PerModelSafeGroupState(bool* dirty_flag); | 335 explicit PerModelSafeGroupState(bool* dirty_flag); |
336 ~PerModelSafeGroupState(); | 336 ~PerModelSafeGroupState(); |
337 | 337 |
338 UpdateProgress update_progress; | 338 UpdateProgress update_progress; |
339 ConflictProgress conflict_progress; | 339 ConflictProgress conflict_progress; |
340 }; | 340 }; |
341 | 341 |
342 } // namespace sessions | 342 } // namespace sessions |
343 } // namespace browser_sync | 343 } // namespace browser_sync |
344 | 344 |
345 #endif // CHROME_BROWSER_SYNC_SESSIONS_SESSION_STATE_H_ | 345 #endif // CHROME_BROWSER_SYNC_SESSIONS_SESSION_STATE_H_ |
OLD | NEW |