diff options
author | stanisc <stanisc@chromium.org> | 2015-02-23 18:14:08 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-24 02:14:54 +0000 |
commit | 3b78f0eafeca764920557094ab88eaadcfc3fca5 (patch) | |
tree | fe693bca1167e4a41552d55b63e4a1087241dd6a /sync/engine/directory_update_handler.cc | |
parent | b79e3657ab4c968ffb5eae952ff7f3b48831e632 (diff) | |
download | chromium_src-3b78f0eafeca764920557094ab88eaadcfc3fca5.zip chromium_src-3b78f0eafeca764920557094ab88eaadcfc3fca5.tar.gz chromium_src-3b78f0eafeca764920557094ab88eaadcfc3fca5.tar.bz2 |
Sync: Small refactoring of Directory::CheckTreeInvariants.
The purpose of this change is to minimize chances of hitting
crbug/456029.
1) Call ModelTypeToRootTag only when the root folder could
potentially be created on the client i.e. model type is
defined in client EntitySpecifics and it is one of supported
model types.
2) Rename is_type_root_folder to is_client_creatable_type_root_folder
to make it clear that the checks are specific to client
created type root folders.
3) Narrow the scope of where is_client_creatable_type_root_folder
has to be calculated.
BUG=456029
Review URL: https://codereview.chromium.org/948113005
Cr-Commit-Position: refs/heads/master@{#317742}
Diffstat (limited to 'sync/engine/directory_update_handler.cc')
-rw-r--r-- | sync/engine/directory_update_handler.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sync/engine/directory_update_handler.cc b/sync/engine/directory_update_handler.cc index 04c83da..adcece7 100644 --- a/sync/engine/directory_update_handler.cc +++ b/sync/engine/directory_update_handler.cc @@ -68,7 +68,7 @@ SyncerError DirectoryUpdateHandler::ProcessGetUpdatesResponse( // Auto-create permanent folder for the type if the progress marker // changes from empty to non-empty. - if (!IsTypeWithServerGeneratedRoot(type_) && + if (IsTypeWithClientGeneratedRoot(type_) && dir_->HasEmptyDownloadProgress(type_) && IsValidProgressMarker(progress_marker)) { CreateTypeRoot(&trans); |