Index: sync/syncable/scoped_parent_child_index_updater.h |
diff --git a/sync/syncable/scoped_parent_child_index_updater.h b/sync/syncable/scoped_parent_child_index_updater.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f9e99d969d7781a3588dab34e453a8a1272cee17 |
--- /dev/null |
+++ b/sync/syncable/scoped_parent_child_index_updater.h |
@@ -0,0 +1,32 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef SYNC_SYNCABLE_PARENT_CHILD_INDEX_UPDATER_H_ |
+#define SYNC_SYNCABLE_PARENT_CHILD_INDEX_UPDATER_H_ |
+ |
+namespace syncer { |
+namespace syncable { |
+ |
+class ParentChildIndex; |
+class ScopedKernelLock; |
+struct EntryKernel; |
+ |
+// Temporarily removes an item from the ParentChildIndex and re-adds it this |
+// object goes out of scope. |
+class ScopedParentChildIndexUpdater { |
+ public: |
+ ScopedParentChildIndexUpdater(ScopedKernelLock& proof_of_lock, |
+ EntryKernel* entry, |
+ ParentChildIndex* index); |
+ ~ScopedParentChildIndexUpdater(); |
+ |
+ private: |
+ EntryKernel* entry_; |
+ ParentChildIndex* index_; |
+}; |
+ |
+} // namespace syncer |
+} // namespace syncable |
+ |
+#endif // SYNC_SYNCABLE_PARENT_CHILD_INDEX_UPDATER_H_ |