Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Side by Side Diff: sync/syncable/scoped_index_updater.h

Issue 10699044: [Sync] Move sync/{internal_api,syncable} into syncer namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync to head Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sync/syncable/read_transaction.cc ('k') | sync/syncable/scoped_kernel_lock.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef SYNC_SYNCABLE_SCOPED_INDEX_UPDATER_H_ 5 #ifndef SYNC_SYNCABLE_SCOPED_INDEX_UPDATER_H_
6 #define SYNC_SYNCABLE_SCOPED_INDEX_UPDATER_H_ 6 #define SYNC_SYNCABLE_SCOPED_INDEX_UPDATER_H_
7 7
8 #include "sync/syncable/directory.h" 8 #include "sync/syncable/directory.h"
9 9
10 namespace syncer {
10 namespace syncable { 11 namespace syncable {
11 class ScopedKernelLock; 12 class ScopedKernelLock;
12 13
13 // A ScopedIndexUpdater temporarily removes an entry from an index, 14 // A ScopedIndexUpdater temporarily removes an entry from an index,
14 // and restores it to the index when the scope exits. This simplifies 15 // and restores it to the index when the scope exits. This simplifies
15 // the common pattern where items need to be removed from an index 16 // the common pattern where items need to be removed from an index
16 // before updating the field. 17 // before updating the field.
17 // 18 //
18 // This class is parameterized on the Indexer traits type, which 19 // This class is parameterized on the Indexer traits type, which
19 // must define a Comparator and a static bool ShouldInclude 20 // must define a Comparator and a static bool ShouldInclude
(...skipping 24 matching lines...) Expand all
44 } 45 }
45 } 46 }
46 private: 47 private:
47 // The entry that was temporarily removed from the index. 48 // The entry that was temporarily removed from the index.
48 EntryKernel* entry_; 49 EntryKernel* entry_;
49 // The index which we are updating. 50 // The index which we are updating.
50 typename Index<Indexer>::Set* const index_; 51 typename Index<Indexer>::Set* const index_;
51 }; 52 };
52 53
53 } // namespace syncable 54 } // namespace syncable
55 } // namespace syncer
54 56
55 #endif // SYNC_SYNCABLE_SCOPED_INDEX_UPDATER_H_ 57 #endif // SYNC_SYNCABLE_SCOPED_INDEX_UPDATER_H_
OLDNEW
« no previous file with comments | « sync/syncable/read_transaction.cc ('k') | sync/syncable/scoped_kernel_lock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698