Index: chrome/browser/chromeos/file_system_provider/operations/create_file.h |
diff --git a/chrome/browser/chromeos/file_system_provider/operations/close_file.h b/chrome/browser/chromeos/file_system_provider/operations/create_file.h |
similarity index 72% |
copy from chrome/browser/chromeos/file_system_provider/operations/close_file.h |
copy to chrome/browser/chromeos/file_system_provider/operations/create_file.h |
index 83bafff2f5ef3a5af85008ff6fb3fca78a3a030e..4c9af21d232bab14c89c467f04057c0cc8c526e2 100644 |
--- a/chrome/browser/chromeos/file_system_provider/operations/close_file.h |
+++ b/chrome/browser/chromeos/file_system_provider/operations/create_file.h |
@@ -2,8 +2,8 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_CLOSE_FILE_H_ |
-#define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_CLOSE_FILE_H_ |
+#ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_CREATE_FILE_H_ |
+#define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_CREATE_FILE_H_ |
#include "base/files/file.h" |
#include "base/memory/scoped_ptr.h" |
@@ -25,16 +25,15 @@ namespace chromeos { |
namespace file_system_provider { |
namespace operations { |
-// Opens a file for either read or write, with optionally creating the file |
-// first. Note, that this is part of fileapi::CreateOrOpen file, but it does |
-// not download the file locally. Created per request. |
-class CloseFile : public Operation { |
+// Creates a file. If the file already exists, then the operation will fail with |
+// the FILE_ERROR_EXISTS error. Created per request. |
+class CreateFile : public Operation { |
public: |
- CloseFile(extensions::EventRouter* event_router, |
- const ProvidedFileSystemInfo& file_system_info, |
- int open_request_id, |
- const fileapi::AsyncFileUtil::StatusCallback& callback); |
- virtual ~CloseFile(); |
+ CreateFile(extensions::EventRouter* event_router, |
+ const ProvidedFileSystemInfo& file_system_info, |
+ const base::FilePath& file_path, |
+ const fileapi::AsyncFileUtil::StatusCallback& callback); |
+ virtual ~CreateFile(); |
// Operation overrides. |
virtual bool Execute(int request_id) OVERRIDE; |
@@ -46,14 +45,14 @@ class CloseFile : public Operation { |
base::File::Error error) OVERRIDE; |
private: |
- int open_request_id_; |
+ base::FilePath file_path_; |
const fileapi::AsyncFileUtil::StatusCallback callback_; |
- DISALLOW_COPY_AND_ASSIGN(CloseFile); |
+ DISALLOW_COPY_AND_ASSIGN(CreateFile); |
}; |
} // namespace operations |
} // namespace file_system_provider |
} // namespace chromeos |
-#endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_CLOSE_FILE_H_ |
+#endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_CREATE_FILE_H_ |