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