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

Unified Diff: chrome/browser/chromeos/gdata/gdata_file_system.cc

Issue 9580016: Fixed remaining CL comments from review of http://codereview.chromium.org/9561009/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 10 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
Index: chrome/browser/chromeos/gdata/gdata_file_system.cc
===================================================================
--- chrome/browser/chromeos/gdata/gdata_file_system.cc (revision 124690)
+++ chrome/browser/chromeos/gdata/gdata_file_system.cc (working copy)
@@ -458,6 +458,10 @@
// this function.
break;
}
+ default: {
+ NOTREACHED();
+ break;
+ }
}
// Do we have a parent directory here as well? We can't then create target
@@ -574,10 +578,11 @@
// Not done yet with recursive directory creation?
if (params.target_directory_path != params.created_directory_path &&
params.is_recursive) {
- CreateDirectory(params.target_directory_path,
- params.is_exclusive,
- params.is_recursive,
- params.callback);
+ CreateDirectoryInternal(params.target_directory_path,
+ params.is_exclusive,
+ params.is_recursive,
+ params.callback,
+ params.proxy);
return;
}
@@ -741,7 +746,6 @@
return base::PLATFORM_FILE_OK;
}
-
base::PlatformFileError GDataFileSystem::AddNewDirectory(
const FilePath& directory_path, base::Value* entry_value) {
if (!entry_value)
@@ -765,6 +769,9 @@
if (!file)
return base::PLATFORM_FILE_ERROR_FAILED;
+ // Check if parent is a directory since in theory since this is a callback
+ // something could in the meantime have nuked the parent dir and created a
+ // file with the exact same name.
GDataDirectory* parent_dir = file->AsGDataDirectory();
if (!parent_dir)
return base::PLATFORM_FILE_ERROR_FAILED;
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_file_system.h ('k') | chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698