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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 const std::vector<ModelSafeWorker*>& workers() const { return workers_; } | 170 const std::vector<ModelSafeWorker*>& workers() const { return workers_; } |
171 const ModelSafeRoutingInfo& routing_info() const { return routing_info_; } | 171 const ModelSafeRoutingInfo& routing_info() const { return routing_info_; } |
172 const SyncSourceInfo& source() const { return source_; } | 172 const SyncSourceInfo& source() const { return source_; } |
173 | 173 |
174 // Returns the set of groups which have enabled types. | 174 // Returns the set of groups which have enabled types. |
175 const std::set<ModelSafeGroup>& GetEnabledGroups() const; | 175 const std::set<ModelSafeGroup>& GetEnabledGroups() const; |
176 | 176 |
177 // Returns the set of enabled groups that have conflicts. | 177 // Returns the set of enabled groups that have conflicts. |
178 std::set<ModelSafeGroup> GetEnabledGroupsWithConflicts() const; | 178 std::set<ModelSafeGroup> GetEnabledGroupsWithConflicts() const; |
179 | 179 |
180 // Returns the set of enabled groups that have verified updates. | |
181 std::set<ModelSafeGroup> GetEnabledGroupsWithVerifiedUpdates() const; | |
182 | |
183 // Mark the session has having finished all the sync steps it needed. | 180 // Mark the session has having finished all the sync steps it needed. |
184 void SetFinished(); | 181 void SetFinished(); |
185 | 182 |
186 private: | 183 private: |
187 // Extend the encapsulation boundary to utilities for internal member | 184 // Extend the encapsulation boundary to utilities for internal member |
188 // assignments. This way, the scope of these actions is explicit, they can't | 185 // assignments. This way, the scope of these actions is explicit, they can't |
189 // be overridden, and assigning is always accompanied by unassigning. | 186 // be overridden, and assigning is always accompanied by unassigning. |
190 friend class ScopedSetSessionWriteTransaction; | 187 friend class ScopedSetSessionWriteTransaction; |
191 | 188 |
192 // The context for this session, guaranteed to outlive |this|. | 189 // The context for this session, guaranteed to outlive |this|. |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 | 239 |
243 private: | 240 private: |
244 SyncSession* session_; | 241 SyncSession* session_; |
245 DISALLOW_COPY_AND_ASSIGN(ScopedSetSessionWriteTransaction); | 242 DISALLOW_COPY_AND_ASSIGN(ScopedSetSessionWriteTransaction); |
246 }; | 243 }; |
247 | 244 |
248 } // namespace sessions | 245 } // namespace sessions |
249 } // namespace syncer | 246 } // namespace syncer |
250 | 247 |
251 #endif // SYNC_SESSIONS_SYNC_SESSION_H_ | 248 #endif // SYNC_SESSIONS_SYNC_SESSION_H_ |
OLD | NEW |