Index: chrome/browser/chromeos/file_system_provider/operations/create_directory.h |
diff --git a/chrome/browser/chromeos/file_system_provider/operations/open_file.h b/chrome/browser/chromeos/file_system_provider/operations/create_directory.h |
similarity index 64% |
copy from chrome/browser/chromeos/file_system_provider/operations/open_file.h |
copy to chrome/browser/chromeos/file_system_provider/operations/create_directory.h |
index d0fe1a0f693ee0a5bcbcf0052c32ce6e265c5811..e373284b445973e07704ecd77ea47dd0c65b9e18 100644 |
--- a/chrome/browser/chromeos/file_system_provider/operations/open_file.h |
+++ b/chrome/browser/chromeos/file_system_provider/operations/create_directory.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_OPEN_FILE_H_ |
-#define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_OPEN_FILE_H_ |
+#ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_CREATE_DIRECTORY_H_ |
+#define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_CREATE_DIRECTORY_H_ |
#include "base/files/file.h" |
#include "base/memory/scoped_ptr.h" |
@@ -25,18 +25,18 @@ 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 OpenFile : public Operation { |
+// Created a directory. If |recursive| is set to true, then creates also all |
kinaba
2014/07/07 05:24:08
nit: Created -> Creates
mtomasz
2014/07/07 05:53:54
Done.
|
+// non-existing directories on the path. If |exclusive| is true, then the |
+// operation will fail if the directory already exists. Created per request. |
+class CreateDirectory : public Operation { |
public: |
- OpenFile(extensions::EventRouter* event_router, |
- const ProvidedFileSystemInfo& file_system_info, |
- const base::FilePath& file_path, |
- ProvidedFileSystemInterface::OpenFileMode mode, |
- bool create, |
- const ProvidedFileSystemInterface::OpenFileCallback& callback); |
- virtual ~OpenFile(); |
+ CreateDirectory(extensions::EventRouter* event_router, |
+ const ProvidedFileSystemInfo& file_system_info, |
+ const base::FilePath& directory_path, |
+ bool exclusive, |
+ bool recursive, |
+ const fileapi::AsyncFileUtil::StatusCallback& callback); |
+ virtual ~CreateDirectory(); |
// Operation overrides. |
virtual bool Execute(int request_id) OVERRIDE; |
@@ -48,16 +48,17 @@ class OpenFile : public Operation { |
base::File::Error error) OVERRIDE; |
private: |
- base::FilePath file_path_; |
+ base::FilePath directory_path_; |
ProvidedFileSystemInterface::OpenFileMode mode_; |
- bool create_; |
- const ProvidedFileSystemInterface::OpenFileCallback callback_; |
+ bool exclusive_; |
+ bool recursive_; |
+ const fileapi::AsyncFileUtil::StatusCallback callback_; |
- DISALLOW_COPY_AND_ASSIGN(OpenFile); |
+ DISALLOW_COPY_AND_ASSIGN(CreateDirectory); |
}; |
} // namespace operations |
} // namespace file_system_provider |
} // namespace chromeos |
-#endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_OPEN_FILE_H_ |
+#endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_CREATE_DIRECTORY_H_ |