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

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

Issue 2388163002: [Sync] Move //components/sync to the syncer namespace, take 2. (Closed)
Patch Set: Rebase. Created 4 years, 2 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
« no previous file with comments | « components/sync/syncable/nigori_util.h ('k') | components/sync/syncable/syncable_id.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8559b7e86b72d0583c2d122386c3af4a5b29bcec..c0db190fe76f8ea4b012ad28232ac01ea6f8035a 100644
--- a/components/sync/syncable/parent_child_index.cc
+++ b/components/sync/syncable/parent_child_index.cc
@@ -4,6 +4,8 @@
#include "components/sync/syncable/parent_child_index.h"
+#include <utility>
+
#include "base/stl_util.h"
#include "components/sync/syncable/entry_kernel.h"
@@ -80,8 +82,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);
@@ -173,7 +174,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 {
« no previous file with comments | « components/sync/syncable/nigori_util.h ('k') | components/sync/syncable/syncable_id.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698