| OLD | NEW |
| 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 #include "components/sync/syncable/parent_child_index.h" | 5 #include "components/sync/syncable/parent_child_index.h" |
| 6 | 6 |
| 7 #include <memory> | |
| 8 | |
| 9 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
| 10 #include "components/sync/syncable/entry_kernel.h" | 8 #include "components/sync/syncable/entry_kernel.h" |
| 11 #include "components/sync/syncable/syncable_id.h" | |
| 12 | 9 |
| 13 namespace syncer { | 10 namespace syncer { |
| 14 namespace syncable { | 11 namespace syncable { |
| 15 | 12 |
| 16 bool ChildComparator::operator()(const EntryKernel* a, | 13 bool ChildComparator::operator()(const EntryKernel* a, |
| 17 const EntryKernel* b) const { | 14 const EntryKernel* b) const { |
| 18 const UniquePosition& a_pos = a->ref(UNIQUE_POSITION); | 15 const UniquePosition& a_pos = a->ref(UNIQUE_POSITION); |
| 19 const UniquePosition& b_pos = b->ref(UNIQUE_POSITION); | 16 const UniquePosition& b_pos = b->ref(UNIQUE_POSITION); |
| 20 | 17 |
| 21 if (a_pos.IsValid() && b_pos.IsValid()) { | 18 if (a_pos.IsValid() && b_pos.IsValid()) { |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 OrderedChildSetRef(new OrderedChildSet()); | 204 OrderedChildSetRef(new OrderedChildSet()); |
| 208 return type_root_child_sets_[model_type]; | 205 return type_root_child_sets_[model_type]; |
| 209 } | 206 } |
| 210 | 207 |
| 211 const Id& ParentChildIndex::GetModelTypeRootId(ModelType model_type) const { | 208 const Id& ParentChildIndex::GetModelTypeRootId(ModelType model_type) const { |
| 212 return model_type_root_ids_[model_type]; | 209 return model_type_root_ids_[model_type]; |
| 213 } | 210 } |
| 214 | 211 |
| 215 } // namespace syncable | 212 } // namespace syncable |
| 216 } // namespace syncer | 213 } // namespace syncer |
| OLD | NEW |