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 // A class representing an attempt to synchronize the local syncable data | 5 // A class representing an attempt to synchronize the local syncable data |
6 // store with a sync server. A SyncSession instance is passed as a stateful | 6 // store with a sync server. A SyncSession instance is passed as a stateful |
7 // bundle to and from various SyncerCommands with the goal of converging the | 7 // bundle to and from various SyncerCommands with the goal of converging the |
8 // client view of data with that of the server. The commands twiddle with | 8 // client view of data with that of the server. The commands twiddle with |
9 // session status in response to events and hiccups along the way, set and | 9 // session status in response to events and hiccups along the way, set and |
10 // query session progress with regards to conflict resolution and applying | 10 // query session progress with regards to conflict resolution and applying |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 // assignments. This way, the scope of these actions is explicit, they can't | 158 // assignments. This way, the scope of these actions is explicit, they can't |
159 // be overridden, and assigning is always accompanied by unassigning. | 159 // be overridden, and assigning is always accompanied by unassigning. |
160 friend class ScopedSetSessionWriteTransaction; | 160 friend class ScopedSetSessionWriteTransaction; |
161 | 161 |
162 // The context for this session, guaranteed to outlive |this|. | 162 // The context for this session, guaranteed to outlive |this|. |
163 SyncSessionContext* const context_; | 163 SyncSessionContext* const context_; |
164 | 164 |
165 // The source for initiating this sync session. | 165 // The source for initiating this sync session. |
166 SyncSourceInfo source_; | 166 SyncSourceInfo source_; |
167 | 167 |
| 168 // A list of sources for sessions that have been merged with this one. |
| 169 // Currently used only for logging. |
| 170 std::vector<SyncSourceInfo> debug_info_sources_list_; |
| 171 |
168 // Information about extensions activity since the last successful commit. | 172 // Information about extensions activity since the last successful commit. |
169 ExtensionsActivityMonitor::Records extensions_activity_; | 173 ExtensionsActivityMonitor::Records extensions_activity_; |
170 | 174 |
171 // Used to allow various steps to share a transaction. Can be NULL. | 175 // Used to allow various steps to share a transaction. Can be NULL. |
172 syncable::WriteTransaction* write_transaction_; | 176 syncable::WriteTransaction* write_transaction_; |
173 | 177 |
174 // The delegate for this session, must never be NULL. | 178 // The delegate for this session, must never be NULL. |
175 Delegate* const delegate_; | 179 Delegate* const delegate_; |
176 | 180 |
177 // Our controller for various status and error counters. | 181 // Our controller for various status and error counters. |
(...skipping 30 matching lines...) Expand all Loading... |
208 | 212 |
209 private: | 213 private: |
210 SyncSession* session_; | 214 SyncSession* session_; |
211 DISALLOW_COPY_AND_ASSIGN(ScopedSetSessionWriteTransaction); | 215 DISALLOW_COPY_AND_ASSIGN(ScopedSetSessionWriteTransaction); |
212 }; | 216 }; |
213 | 217 |
214 } // namespace sessions | 218 } // namespace sessions |
215 } // namespace syncer | 219 } // namespace syncer |
216 | 220 |
217 #endif // SYNC_SESSIONS_SYNC_SESSION_H_ | 221 #endif // SYNC_SESSIONS_SYNC_SESSION_H_ |
OLD | NEW |