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

Unified Diff: chrome/browser/chromeos/extensions/file_browser_handler_api.cc

Issue 10600013: Wired support for file truncating with RemoteFileSystemOperation::OpenFile() method (case when base… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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/extensions/file_browser_handler_api.cc
diff --git a/chrome/browser/chromeos/extensions/file_browser_handler_api.cc b/chrome/browser/chromeos/extensions/file_browser_handler_api.cc
index 3052980b0f00422b0156de5211cf0ac6d00424f2..99a73d91a0ae1ee8bee502b5304a93d7000eaf99 100644
--- a/chrome/browser/chromeos/extensions/file_browser_handler_api.cc
+++ b/chrome/browser/chromeos/extensions/file_browser_handler_api.cc
@@ -237,29 +237,11 @@ void FileHandlerSelectFileFunction::CreateFileOnFileThread(
const GURL& file_system_root) {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
- if (success)
- success = DoCreateFile();
content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
base::Bind(&FileHandlerSelectFileFunction::OnFileCreated, this,
success, file_system_name, file_system_root));
}
-bool FileHandlerSelectFileFunction::DoCreateFile() {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
-
- // Don't allow links.
- if (file_util::PathExists(full_path_) && file_util::IsLink(full_path_))
- return false;
-
- bool created = false;
- base::PlatformFileError error = base::PLATFORM_FILE_OK;
- int creation_flags = base::PLATFORM_FILE_CREATE_ALWAYS |
- base::PLATFORM_FILE_READ |
- base::PLATFORM_FILE_WRITE;
- base::CreatePlatformFile(full_path_, creation_flags, &created, &error);
- return error == base::PLATFORM_FILE_OK;
-}
-
void FileHandlerSelectFileFunction::OnFileCreated(
bool success,
const std::string& file_system_name,
« no previous file with comments | « chrome/browser/chromeos/extensions/file_browser_handler_api.h ('k') | chrome/browser/chromeos/gdata/gdata_file_system_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698