| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // Counters for various errors that can occur repeatedly during a sync session. | 85 // Counters for various errors that can occur repeatedly during a sync session. |
| 86 // TODO(lipalani) : Rename this structure to Error. | 86 // TODO(lipalani) : Rename this structure to Error. |
| 87 struct ErrorCounters { | 87 struct ErrorCounters { |
| 88 ErrorCounters(); | 88 ErrorCounters(); |
| 89 | 89 |
| 90 // Any protocol errors that we received during this sync session. | 90 // Any protocol errors that we received during this sync session. |
| 91 SyncProtocolError sync_protocol_error; | 91 SyncProtocolError sync_protocol_error; |
| 92 | 92 |
| 93 // Records the most recent results of PostCommit and GetUpdates commands. | 93 // Records the most recent results of PostCommit and GetUpdates commands. |
| 94 SyncerError last_download_updates_result; | 94 SyncerError last_download_updates_result; |
| 95 SyncerError last_post_commit_result; | 95 SyncerError commit_result; |
| 96 SyncerError last_process_commit_response_result; | |
| 97 }; | 96 }; |
| 98 | 97 |
| 99 // An immutable snapshot of state from a SyncSession. Convenient to use as | 98 // An immutable snapshot of state from a SyncSession. Convenient to use as |
| 100 // part of notifications as it is inherently thread-safe. | 99 // part of notifications as it is inherently thread-safe. |
| 101 // TODO(zea): if copying this all over the place starts getting expensive, | 100 // TODO(zea): if copying this all over the place starts getting expensive, |
| 102 // consider passing around immutable references instead of values. | 101 // consider passing around immutable references instead of values. |
| 103 // Default copy and assign welcome. | 102 // Default copy and assign welcome. |
| 104 class SyncSessionSnapshot { | 103 class SyncSessionSnapshot { |
| 105 public: | 104 public: |
| 106 SyncSessionSnapshot(); | 105 SyncSessionSnapshot(); |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 ~PerModelSafeGroupState(); | 331 ~PerModelSafeGroupState(); |
| 333 | 332 |
| 334 UpdateProgress update_progress; | 333 UpdateProgress update_progress; |
| 335 ConflictProgress conflict_progress; | 334 ConflictProgress conflict_progress; |
| 336 }; | 335 }; |
| 337 | 336 |
| 338 } // namespace sessions | 337 } // namespace sessions |
| 339 } // namespace browser_sync | 338 } // namespace browser_sync |
| 340 | 339 |
| 341 #endif // SYNC_SESSIONS_SESSION_STATE_H_ | 340 #endif // SYNC_SESSIONS_SESSION_STATE_H_ |
| OLD | NEW |