summaryrefslogtreecommitdiffstats
path: root/sync/syncable/entry_kernel.cc
diff options
context:
space:
mode:
authorrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-26 22:58:00 +0000
committerrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-26 22:58:00 +0000
commit65e022eeecdde17380365097d983b5cb2499bdf0 (patch)
treef13891293c73c03bf55406dcc8ede90d6a7833ba /sync/syncable/entry_kernel.cc
parentc536d0ad364d28121e47c0d0237a0cc462a79342 (diff)
downloadchromium_src-65e022eeecdde17380365097d983b5cb2499bdf0.zip
chromium_src-65e022eeecdde17380365097d983b5cb2499bdf0.tar.gz
chromium_src-65e022eeecdde17380365097d983b5cb2499bdf0.tar.bz2
sync: Stop supporting parent IDs for some types
Makes non-bookmarks nodes no longer send up a parent ID for each of their commits. This is part of an update to the sync protocol that will eventually allow both the client and server to remove support for type root nodes. Note that the client still expects to receive type root nodes from the server. That expectation will be removed in a future CL. BUG=373869 Review URL: https://codereview.chromium.org/310993002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280148 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/syncable/entry_kernel.cc')
-rw-r--r--sync/syncable/entry_kernel.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/sync/syncable/entry_kernel.cc b/sync/syncable/entry_kernel.cc
index 0821999..d945d50 100644
--- a/sync/syncable/entry_kernel.cc
+++ b/sync/syncable/entry_kernel.cc
@@ -56,6 +56,14 @@ bool EntryKernel::ShouldMaintainPosition() const {
&& !(!ref(UNIQUE_SERVER_TAG).empty() && ref(IS_DIR));
}
+bool EntryKernel::ShouldMaintainHierarchy() const {
+ // We maintain hierarchy for bookmarks, device info, and top-level folders,
+ // but no other types. Note that the Nigori node consists of a single
+ // top-level folder, so it's included in this set.
+ return (GetModelTypeFromSpecifics(ref(SPECIFICS)) == syncer::BOOKMARKS)
+ || (!ref(UNIQUE_SERVER_TAG).empty());
+}
+
namespace {
// Utility function to loop through a set of enum values and add the