| 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 // Various iterators, size, and retrieval functions for conflict sets. | 169 // Various iterators, size, and retrieval functions for conflict sets. |
| 170 IdToConflictSetMap::const_iterator IdToConflictSetBegin() const; | 170 IdToConflictSetMap::const_iterator IdToConflictSetBegin() const; |
| 171 IdToConflictSetMap::const_iterator IdToConflictSetEnd() const; | 171 IdToConflictSetMap::const_iterator IdToConflictSetEnd() const; |
| 172 IdToConflictSetMap::size_type IdToConflictSetSize() const; | 172 IdToConflictSetMap::size_type IdToConflictSetSize() const; |
| 173 IdToConflictSetMap::const_iterator IdToConflictSetFind( | 173 IdToConflictSetMap::const_iterator IdToConflictSetFind( |
| 174 const syncable::Id& the_id) const; | 174 const syncable::Id& the_id) const; |
| 175 const ConflictSet* IdToConflictSetGet(const syncable::Id& the_id); | 175 const ConflictSet* IdToConflictSetGet(const syncable::Id& the_id); |
| 176 std::set<ConflictSet*>::const_iterator ConflictSetsBegin() const; | 176 std::set<ConflictSet*>::const_iterator ConflictSetsBegin() const; |
| 177 std::set<ConflictSet*>::const_iterator ConflictSetsEnd() const; | 177 std::set<ConflictSet*>::const_iterator ConflictSetsEnd() const; |
| 178 std::set<ConflictSet*>::size_type ConflictSetsSize() const; | 178 std::set<ConflictSet*>::size_type ConflictSetsSize() const; |
| 179 bool HasSimpleConflictItem(const syncable::Id& id) const; |
| 179 | 180 |
| 180 // Various mutators for tracking commit conflicts. | 181 // Various mutators for tracking commit conflicts. |
| 181 void AddConflictingItemById(const syncable::Id& the_id); | 182 void AddConflictingItemById(const syncable::Id& the_id); |
| 182 void EraseConflictingItemById(const syncable::Id& the_id); | 183 void EraseConflictingItemById(const syncable::Id& the_id); |
| 183 int ConflictingItemsSize() const { return conflicting_item_ids_.size(); } | 184 int ConflictingItemsSize() const { return conflicting_item_ids_.size(); } |
| 184 std::set<syncable::Id>::const_iterator ConflictingItemsBegin() const; | 185 std::set<syncable::Id>::const_iterator ConflictingItemsBegin() const; |
| 185 std::set<syncable::Id>::const_iterator ConflictingItemsEnd() const; | 186 std::set<syncable::Id>::const_iterator ConflictingItemsEnd() const; |
| 186 | 187 |
| 187 // Mutators for nonblocking conflicting items (see description below). | 188 // Mutators for nonblocking conflicting items (see description below). |
| 188 void AddNonblockingConflictingItemById(const syncable::Id& the_id); | 189 void AddNonblockingConflictingItemById(const syncable::Id& the_id); |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 ~PerModelSafeGroupState(); | 341 ~PerModelSafeGroupState(); |
| 341 | 342 |
| 342 UpdateProgress update_progress; | 343 UpdateProgress update_progress; |
| 343 ConflictProgress conflict_progress; | 344 ConflictProgress conflict_progress; |
| 344 }; | 345 }; |
| 345 | 346 |
| 346 } // namespace sessions | 347 } // namespace sessions |
| 347 } // namespace browser_sync | 348 } // namespace browser_sync |
| 348 | 349 |
| 349 #endif // CHROME_BROWSER_SYNC_SESSIONS_SESSION_STATE_H_ | 350 #endif // CHROME_BROWSER_SYNC_SESSIONS_SESSION_STATE_H_ |
| OLD | NEW |