diff options
author | stanisc <stanisc@chromium.org> | 2015-05-27 19:04:37 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-28 02:05:11 +0000 |
commit | b19a0a0cb7b4c2b1757c2fc828e10a93e55ac8ae (patch) | |
tree | 693a20ce478709ec6c4b8d72a267cb2a3a949e6e /sync/engine | |
parent | 7ed0255b790de7956d76b77215c290e1bf5b28b4 (diff) | |
download | chromium_src-b19a0a0cb7b4c2b1757c2fc828e10a93e55ac8ae.zip chromium_src-b19a0a0cb7b4c2b1757c2fc828e10a93e55ac8ae.tar.gz chromium_src-b19a0a0cb7b4c2b1757c2fc828e10a93e55ac8ae.tar.bz2 |
Fixed Implicit Permanent Folders issues found when testing with alpha server
This addresses two more issues found when testing the client with
Sync Server Alpha server with Implicit Permanent Folders feature
enabled. Additionally this change bumps the protocol version
to
45 - the version required on the server to turn this feature on.
The issues fixed are:
1) Directory::InitialSyncEndedForType expected the permanent
folder to be created from a server update. That isn't the case anymore.
Permanent folders are created on demand on the client when
processing updates. I've simplified the check to skip the base
version check.
2) In Traversal::SupportsHierarchy the check for whether an
item supports hierarchy was based on presence of Parent ID
field. That cased an issue committing a new DeviceInfo which
still had Parent ID specified - an attempt to commit the client
side created DeviceInfo permanent folder to the server.
Even if the type uses implicit permanent folders it might for a
transition period still have a mix of items with and without
the parent ID. The hierarchy traversal for commit
should use a static check based on the type rather than
checking each item's Parent ID individually.
I tested sync between a client with this fixes connected to the
Alpha server and a regular client connected to the regular server
and didn't find any further issues.
BUG=438313
Review URL: https://codereview.chromium.org/1142423006
Cr-Commit-Position: refs/heads/master@{#331717}
Diffstat (limited to 'sync/engine')
-rw-r--r-- | sync/engine/get_commit_ids.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sync/engine/get_commit_ids.cc b/sync/engine/get_commit_ids.cc index f87524d..c9b5a5b 100644 --- a/sync/engine/get_commit_ids.cc +++ b/sync/engine/get_commit_ids.cc @@ -453,7 +453,8 @@ bool Traversal::HaveItem(int64 handle) const { } bool Traversal::SupportsHierarchy(const syncable::Entry& item) const { - return !item.GetParentId().IsNull(); + // Types with explicit server supported hierarchy only. + return IsTypeWithServerGeneratedRoot(item.GetModelType()); } void Traversal::AppendManyToTraversal( |