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

Side by Side Diff: components/sync/syncable/parent_child_index.h

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 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
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_PARENT_CHILD_INDEX_H_ 5 #ifndef COMPONENTS_SYNC_SYNCABLE_PARENT_CHILD_INDEX_H_
6 #define SYNC_SYNCABLE_PARENT_CHILD_INDEX_H_ 6 #define COMPONENTS_SYNC_SYNCABLE_PARENT_CHILD_INDEX_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <set> 10 #include <set>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "sync/base/sync_export.h" 14 #include "components/sync/base/model_type.h"
15 #include "sync/internal_api/public/base/model_type.h" 15 #include "components/sync/base/sync_export.h"
16 #include "sync/syncable/syncable_id.h" 16 #include "components/sync/syncable/syncable_id.h"
17 17
18 namespace syncer { 18 namespace syncer {
19 namespace syncable { 19 namespace syncable {
20 20
21 struct EntryKernel; 21 struct EntryKernel;
22 class ParentChildIndex; 22 class ParentChildIndex;
23 23
24 // A node ordering function. 24 // A node ordering function.
25 struct SYNC_EXPORT ChildComparator { 25 struct SYNC_EXPORT ChildComparator {
26 bool operator() (const EntryKernel* a, const EntryKernel* b) const; 26 bool operator()(const EntryKernel* a, const EntryKernel* b) const;
27 }; 27 };
28 28
29 // An ordered set of nodes. 29 // An ordered set of nodes.
30 typedef std::set<EntryKernel*, ChildComparator> OrderedChildSet; 30 typedef std::set<EntryKernel*, ChildComparator> OrderedChildSet;
31 typedef std::shared_ptr<OrderedChildSet> OrderedChildSetRef; 31 typedef std::shared_ptr<OrderedChildSet> OrderedChildSetRef;
32 32
33 // Container that tracks parent-child relationships. 33 // Container that tracks parent-child relationships.
34 // Provides fast lookup of all items under a given parent. 34 // Provides fast lookup of all items under a given parent.
35 class SYNC_EXPORT ParentChildIndex { 35 class SYNC_EXPORT ParentChildIndex {
36 public: 36 public:
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // non-hierarchical types (types with flat hierarchy) that support entries 95 // non-hierarchical types (types with flat hierarchy) that support entries
96 // with implicit parent. 96 // with implicit parent.
97 TypeRootChildSets type_root_child_sets_; 97 TypeRootChildSets type_root_child_sets_;
98 98
99 DISALLOW_COPY_AND_ASSIGN(ParentChildIndex); 99 DISALLOW_COPY_AND_ASSIGN(ParentChildIndex);
100 }; 100 };
101 101
102 } // namespace syncable 102 } // namespace syncable
103 } // namespace syncer 103 } // namespace syncer
104 104
105 #endif // SYNC_SYNCABLE_PARENT_CHILD_INDEX_H_ 105 #endif // COMPONENTS_SYNC_SYNCABLE_PARENT_CHILD_INDEX_H_
OLDNEW
« no previous file with comments | « components/sync/syncable/on_disk_directory_backing_store.cc ('k') | components/sync/syncable/parent_child_index.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698