Chromium Code Reviews| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 98 // commit. | 98 // commit. |
| 99 int consecutive_transient_error_commits; | 99 int consecutive_transient_error_commits; |
| 100 | 100 |
| 101 // Incremented when get_updates fails, commit fails, and when hitting | 101 // Incremented when get_updates fails, commit fails, and when hitting |
| 102 // transient errors. When any of these succeed, this counter is reset. | 102 // transient errors. When any of these succeed, this counter is reset. |
| 103 // TODO(chron): Reduce number of weird counters we use. | 103 // TODO(chron): Reduce number of weird counters we use. |
| 104 int consecutive_errors; | 104 int consecutive_errors; |
| 105 | 105 |
| 106 // Any protocol errors that we received during this sync session. | 106 // Any protocol errors that we received during this sync session. |
| 107 SyncProtocolError sync_protocol_error; | 107 SyncProtocolError sync_protocol_error; |
| 108 | |
| 109 // Records the most recent results of PostCommit and GetUpdates commands. | |
| 110 SyncerError download_updates_result; | |
|
tim (not reviewing)
2012/01/10 17:17:34
If we only care about the last result, perhaps we
rlarocque
2012/01/10 20:40:56
Done.
It's not that we only care about the most r
| |
| 111 SyncerError post_commit_result; | |
| 112 SyncerError process_commit_response_result; | |
| 108 }; | 113 }; |
| 109 | 114 |
| 110 // Caller takes ownership of the returned dictionary. | 115 // Caller takes ownership of the returned dictionary. |
| 111 base::DictionaryValue* DownloadProgressMarkersToValue( | 116 base::DictionaryValue* DownloadProgressMarkersToValue( |
| 112 const std::string | 117 const std::string |
| 113 (&download_progress_markers)[syncable::MODEL_TYPE_COUNT]); | 118 (&download_progress_markers)[syncable::MODEL_TYPE_COUNT]); |
| 114 | 119 |
| 115 // An immutable snapshot of state from a SyncSession. Convenient to use as | 120 // An immutable snapshot of state from a SyncSession. Convenient to use as |
| 116 // part of notifications as it is inherently thread-safe. | 121 // part of notifications as it is inherently thread-safe. |
| 117 struct SyncSessionSnapshot { | 122 struct SyncSessionSnapshot { |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 335 ~PerModelSafeGroupState(); | 340 ~PerModelSafeGroupState(); |
| 336 | 341 |
| 337 UpdateProgress update_progress; | 342 UpdateProgress update_progress; |
| 338 ConflictProgress conflict_progress; | 343 ConflictProgress conflict_progress; |
| 339 }; | 344 }; |
| 340 | 345 |
| 341 } // namespace sessions | 346 } // namespace sessions |
| 342 } // namespace browser_sync | 347 } // namespace browser_sync |
| 343 | 348 |
| 344 #endif // CHROME_BROWSER_SYNC_SESSIONS_SESSION_STATE_H_ | 349 #endif // CHROME_BROWSER_SYNC_SESSIONS_SESSION_STATE_H_ |
| OLD | NEW |