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

Unified Diff: chrome/browser/chromeos/drive/file_system.cc

Issue 23861006: drive: CreateDirectory should only wait for its parent directory's load. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/drive/file_system.cc
diff --git a/chrome/browser/chromeos/drive/file_system.cc b/chrome/browser/chromeos/drive/file_system.cc
index 28cf8014280f2bcf51827d7ce4d89b296c5506eb..07ab21f380cb743d77d566af49e76f9c02aadb81 100644
--- a/chrome/browser/chromeos/drive/file_system.cc
+++ b/chrome/browser/chromeos/drive/file_system.cc
@@ -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));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698