OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef SYNC_SYNCABLE_PARENT_CHILD_INDEX_UPDATER_H_ |
| 6 #define SYNC_SYNCABLE_PARENT_CHILD_INDEX_UPDATER_H_ |
| 7 |
| 8 namespace syncer { |
| 9 namespace syncable { |
| 10 |
| 11 class ParentChildIndex; |
| 12 class ScopedKernelLock; |
| 13 struct EntryKernel; |
| 14 |
| 15 // Temporarily removes an item from the ParentChildIndex and re-adds it this |
| 16 // object goes out of scope. |
| 17 class ScopedParentChildIndexUpdater { |
| 18 public: |
| 19 ScopedParentChildIndexUpdater(ScopedKernelLock& proof_of_lock, |
| 20 EntryKernel* entry, |
| 21 ParentChildIndex* index); |
| 22 ~ScopedParentChildIndexUpdater(); |
| 23 |
| 24 private: |
| 25 EntryKernel* entry_; |
| 26 ParentChildIndex* index_; |
| 27 }; |
| 28 |
| 29 } // namespace syncer |
| 30 } // namespace syncable |
| 31 |
| 32 #endif // SYNC_SYNCABLE_PARENT_CHILD_INDEX_UPDATER_H_ |
OLD | NEW |