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

Unified Diff: chrome/browser/chromeos/file_system_provider/fileapi/provider_async_file_util.cc

Issue 278113002: Remove PlatformFile from fileapi::AsyncFileUtil (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/file_system_provider/fileapi/provider_async_file_util.cc
diff --git a/chrome/browser/chromeos/file_system_provider/fileapi/provider_async_file_util.cc b/chrome/browser/chromeos/file_system_provider/fileapi/provider_async_file_util.cc
index cf41cbcc682529ca35b44f074aa06dd8b4ea49ed..6613336aae94a60726f655923ccebd16a9adaacb 100644
--- a/chrome/browser/chromeos/file_system_provider/fileapi/provider_async_file_util.cc
+++ b/chrome/browser/chromeos/file_system_provider/fileapi/provider_async_file_util.cc
@@ -8,7 +8,6 @@
#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/logging.h"
-#include "base/platform_file.h"
#include "chrome/browser/chromeos/file_system_provider/mount_path_util.h"
#include "chrome/browser/chromeos/file_system_provider/provided_file_system_interface.h"
#include "content/public/browser/browser_thread.h"
@@ -84,21 +83,16 @@ void ProviderAsyncFileUtil::CreateOrOpen(
int file_flags,
const CreateOrOpenCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
- base::PlatformFile platform_file = base::kInvalidPlatformFileValue;
- if ((file_flags & base::PLATFORM_FILE_CREATE) ||
- (file_flags & base::PLATFORM_FILE_OPEN_ALWAYS) ||
- (file_flags & base::PLATFORM_FILE_CREATE_ALWAYS) ||
- (file_flags & base::PLATFORM_FILE_OPEN_TRUNCATED)) {
- callback.Run(base::File::FILE_ERROR_SECURITY,
- base::PassPlatformFile(&platform_file),
- base::Closure());
+ if ((file_flags & base::File::FLAG_CREATE) ||
+ (file_flags & base::File::FLAG_OPEN_ALWAYS) ||
+ (file_flags & base::File::FLAG_CREATE_ALWAYS) ||
+ (file_flags & base::File::FLAG_OPEN_TRUNCATED)) {
+ callback.Run(base::File(base::File::FILE_ERROR_SECURITY), base::Closure());
return;
}
NOTIMPLEMENTED();
- callback.Run(base::File::FILE_ERROR_NOT_FOUND,
- base::PassPlatformFile(&platform_file),
- base::Closure());
+ callback.Run(base::File(base::File::FILE_ERROR_NOT_FOUND), base::Closure());
}
void ProviderAsyncFileUtil::EnsureFileExists(

Powered by Google App Engine
This is Rietveld 408576698