Commit 36a6e3e1 authored by kinaba@chromium.org's avatar kinaba@chromium.org

drive: CreateDirectory should only wait for its parent directory's load.

Previously it was waiting for the full Drive tree to load,
which takes unnecessarily long time.

BUG=283901
R=hidehiko@chromium.org

Review URL: https://codereview.chromium.org/23861006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221365 0039d316-1c4b-4281-b951-d872f2087c98
parent 18fe0c50
......@@ -455,8 +455,9 @@ void FileSystem::CreateDirectory(
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!callback.is_null());
change_list_loader_->LoadIfNeeded(
internal::DirectoryFetchInfo(),
// Ensure its parent directory is loaded to the local metadata.
LoadDirectoryIfNeeded(
directory_path.DirName(),
base::Bind(&FileSystem::CreateDirectoryAfterLoad,
weak_ptr_factory_.GetWeakPtr(),
directory_path, is_exclusive, is_recursive, callback));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment