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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 bool is_share_usable, | 120 bool is_share_usable, |
121 const syncable::ModelTypeBitSet& initial_sync_ended, | 121 const syncable::ModelTypeBitSet& initial_sync_ended, |
122 const std::string | 122 const std::string |
123 (&download_progress_markers)[syncable::MODEL_TYPE_COUNT], | 123 (&download_progress_markers)[syncable::MODEL_TYPE_COUNT], |
124 bool more_to_sync, | 124 bool more_to_sync, |
125 bool is_silenced, | 125 bool is_silenced, |
126 int64 unsynced_count, | 126 int64 unsynced_count, |
127 int num_blocking_conflicting_updates, | 127 int num_blocking_conflicting_updates, |
128 int num_conflicting_updates, | 128 int num_conflicting_updates, |
129 bool did_commit_items, | 129 bool did_commit_items, |
130 const SyncSourceInfo& source); | 130 const SyncSourceInfo& source, |
| 131 size_t num_entries); |
131 ~SyncSessionSnapshot(); | 132 ~SyncSessionSnapshot(); |
132 | 133 |
133 // Caller takes ownership of the returned dictionary. | 134 // Caller takes ownership of the returned dictionary. |
134 DictionaryValue* ToValue() const; | 135 DictionaryValue* ToValue() const; |
135 | 136 |
136 const SyncerStatus syncer_status; | 137 const SyncerStatus syncer_status; |
137 const ErrorCounters errors; | 138 const ErrorCounters errors; |
138 const int64 num_server_changes_remaining; | 139 const int64 num_server_changes_remaining; |
139 const bool is_share_usable; | 140 const bool is_share_usable; |
140 const syncable::ModelTypeBitSet initial_sync_ended; | 141 const syncable::ModelTypeBitSet initial_sync_ended; |
141 const std::string download_progress_markers[syncable::MODEL_TYPE_COUNT]; | 142 const std::string download_progress_markers[syncable::MODEL_TYPE_COUNT]; |
142 const bool has_more_to_sync; | 143 const bool has_more_to_sync; |
143 const bool is_silenced; | 144 const bool is_silenced; |
144 const int64 unsynced_count; | 145 const int64 unsynced_count; |
145 const int num_blocking_conflicting_updates; | 146 const int num_blocking_conflicting_updates; |
146 const int num_conflicting_updates; | 147 const int num_conflicting_updates; |
147 const bool did_commit_items; | 148 const bool did_commit_items; |
148 const SyncSourceInfo source; | 149 const SyncSourceInfo source; |
| 150 const size_t num_entries; |
149 }; | 151 }; |
150 | 152 |
151 // Tracks progress of conflicts and their resolution using conflict sets. | 153 // Tracks progress of conflicts and their resolution using conflict sets. |
152 class ConflictProgress { | 154 class ConflictProgress { |
153 public: | 155 public: |
154 explicit ConflictProgress(bool* dirty_flag); | 156 explicit ConflictProgress(bool* dirty_flag); |
155 ~ConflictProgress(); | 157 ~ConflictProgress(); |
156 // Various iterators, size, and retrieval functions for conflict sets. | 158 // Various iterators, size, and retrieval functions for conflict sets. |
157 IdToConflictSetMap::const_iterator IdToConflictSetBegin() const; | 159 IdToConflictSetMap::const_iterator IdToConflictSetBegin() const; |
158 IdToConflictSetMap::const_iterator IdToConflictSetEnd() const; | 160 IdToConflictSetMap::const_iterator IdToConflictSetEnd() const; |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 ~PerModelSafeGroupState(); | 325 ~PerModelSafeGroupState(); |
324 | 326 |
325 UpdateProgress update_progress; | 327 UpdateProgress update_progress; |
326 ConflictProgress conflict_progress; | 328 ConflictProgress conflict_progress; |
327 }; | 329 }; |
328 | 330 |
329 } // namespace sessions | 331 } // namespace sessions |
330 } // namespace browser_sync | 332 } // namespace browser_sync |
331 | 333 |
332 #endif // CHROME_BROWSER_SYNC_SESSIONS_SESSION_STATE_H_ | 334 #endif // CHROME_BROWSER_SYNC_SESSIONS_SESSION_STATE_H_ |
OLD | NEW |