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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 const syncable::Id& the_id) const; | 170 const syncable::Id& the_id) const; |
171 const ConflictSet* IdToConflictSetGet(const syncable::Id& the_id); | 171 const ConflictSet* IdToConflictSetGet(const syncable::Id& the_id); |
172 std::set<ConflictSet*>::const_iterator ConflictSetsBegin() const; | 172 std::set<ConflictSet*>::const_iterator ConflictSetsBegin() const; |
173 std::set<ConflictSet*>::const_iterator ConflictSetsEnd() const; | 173 std::set<ConflictSet*>::const_iterator ConflictSetsEnd() const; |
174 std::set<ConflictSet*>::size_type ConflictSetsSize() const; | 174 std::set<ConflictSet*>::size_type ConflictSetsSize() const; |
175 | 175 |
176 // Various mutators for tracking commit conflicts. | 176 // Various mutators for tracking commit conflicts. |
177 void AddConflictingItemById(const syncable::Id& the_id); | 177 void AddConflictingItemById(const syncable::Id& the_id); |
178 void EraseConflictingItemById(const syncable::Id& the_id); | 178 void EraseConflictingItemById(const syncable::Id& the_id); |
179 int ConflictingItemsSize() const { return conflicting_item_ids_.size(); } | 179 int ConflictingItemsSize() const { return conflicting_item_ids_.size(); } |
180 std::set<syncable::Id>::iterator ConflictingItemsBegin(); | 180 std::set<syncable::Id>::const_iterator ConflictingItemsBegin() const; |
181 std::set<syncable::Id>::const_iterator ConflictingItemsBeginConst() const; | |
182 std::set<syncable::Id>::const_iterator ConflictingItemsEnd() const; | 181 std::set<syncable::Id>::const_iterator ConflictingItemsEnd() const; |
183 | 182 |
184 // Mutators for nonblocking conflicting items (see description below). | 183 // Mutators for nonblocking conflicting items (see description below). |
185 void AddNonblockingConflictingItemById(const syncable::Id& the_id); | 184 void AddNonblockingConflictingItemById(const syncable::Id& the_id); |
186 void EraseNonblockingConflictingItemById(const syncable::Id& the_id); | 185 void EraseNonblockingConflictingItemById(const syncable::Id& the_id); |
187 int NonblockingConflictingItemsSize() const { | 186 int NonblockingConflictingItemsSize() const { |
188 return nonblocking_conflicting_item_ids_.size(); | 187 return nonblocking_conflicting_item_ids_.size(); |
189 } | 188 } |
190 | 189 |
191 void MergeSets(const syncable::Id& set1, const syncable::Id& set2); | 190 void MergeSets(const syncable::Id& set1, const syncable::Id& set2); |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 ~PerModelSafeGroupState(); | 336 ~PerModelSafeGroupState(); |
338 | 337 |
339 UpdateProgress update_progress; | 338 UpdateProgress update_progress; |
340 ConflictProgress conflict_progress; | 339 ConflictProgress conflict_progress; |
341 }; | 340 }; |
342 | 341 |
343 } // namespace sessions | 342 } // namespace sessions |
344 } // namespace browser_sync | 343 } // namespace browser_sync |
345 | 344 |
346 #endif // CHROME_BROWSER_SYNC_SESSIONS_SESSION_STATE_H_ | 345 #endif // CHROME_BROWSER_SYNC_SESSIONS_SESSION_STATE_H_ |
OLD | NEW |