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

Unified Diff: components/sync/syncable/parent_child_index.cc

Issue 2376123003: [Sync] Move //components/sync to the syncer namespace. (Closed)
Patch Set: Fix tools and iOS. Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: components/sync/syncable/parent_child_index.cc
diff --git a/components/sync/syncable/parent_child_index.cc b/components/sync/syncable/parent_child_index.cc
index 2090867b0220d63e65fcd890cbced39e39b352a7..3245022477721e35f14041371f70e91ae19f63b0 100644
--- a/components/sync/syncable/parent_child_index.cc
+++ b/components/sync/syncable/parent_child_index.cc
@@ -5,6 +5,7 @@
#include "components/sync/syncable/parent_child_index.h"
#include <memory>
+#include <utility>
#include "base/stl_util.h"
#include "components/sync/syncable/entry_kernel.h"
@@ -83,8 +84,7 @@ bool ParentChildIndex::Insert(EntryKernel* entry) {
// theoretically be sufficient but in practice many tests don't properly
// initialize entries so TypeSupportsHierarchy ends up failing. Consider
// tweaking TypeSupportsHierarchy and fixing all related test code.
- if (parent_id.IsRoot() && entry->ref(IS_DIR) &&
- syncer::IsRealDataType(model_type) &&
+ if (parent_id.IsRoot() && entry->ref(IS_DIR) && IsRealDataType(model_type) &&
!TypeSupportsHierarchy(model_type)) {
const Id& type_root_id = entry->ref(ID);
@@ -176,7 +176,7 @@ bool ParentChildIndex::ShouldUseParentId(const Id& parent_id,
// entries, this returns true any entries directly under root and for entries
// of UNSPECIFIED model type.
return parent_id.IsRoot() || TypeSupportsHierarchy(model_type) ||
- !syncer::IsRealDataType(model_type);
+ !IsRealDataType(model_type);
}
const OrderedChildSetRef ParentChildIndex::GetChildSet(EntryKernel* e) const {

Powered by Google App Engine
This is Rietveld 408576698