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

Unified Diff: chrome/browser/chromeos/file_system_provider/operations/delete_entry.h

Issue 375543002: [fsp] Add support for deleting entries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased + cleaned up. Created 6 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/file_system_provider/operations/delete_entry.h
diff --git a/chrome/browser/chromeos/file_system_provider/operations/close_file.h b/chrome/browser/chromeos/file_system_provider/operations/delete_entry.h
similarity index 69%
copy from chrome/browser/chromeos/file_system_provider/operations/close_file.h
copy to chrome/browser/chromeos/file_system_provider/operations/delete_entry.h
index 83bafff2f5ef3a5af85008ff6fb3fca78a3a030e..675cc395aa32e5a8201d5aab18d039b7bc70db84 100644
--- a/chrome/browser/chromeos/file_system_provider/operations/close_file.h
+++ b/chrome/browser/chromeos/file_system_provider/operations/delete_entry.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_DELETE_ENTRY_H_
+#define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_DELETE_ENTRY_H_
#include "base/files/file.h"
#include "base/memory/scoped_ptr.h"
@@ -25,16 +25,16 @@ 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 {
+// Deletes an entry. If |recursive| is passed and the entry is a directory, then
+// all contents of it (recursively) will be deleted too. Created per request.
+class DeleteEntry : public Operation {
public:
- CloseFile(extensions::EventRouter* event_router,
- const ProvidedFileSystemInfo& file_system_info,
- int open_request_id,
- const fileapi::AsyncFileUtil::StatusCallback& callback);
- virtual ~CloseFile();
+ DeleteEntry(extensions::EventRouter* event_router,
+ const ProvidedFileSystemInfo& file_system_info,
+ const base::FilePath& entry_path,
+ bool recursive,
+ const fileapi::AsyncFileUtil::StatusCallback& callback);
+ virtual ~DeleteEntry();
// Operation overrides.
virtual bool Execute(int request_id) OVERRIDE;
@@ -46,14 +46,16 @@ class CloseFile : public Operation {
base::File::Error error) OVERRIDE;
private:
- int open_request_id_;
+ base::FilePath entry_path_;
+ ProvidedFileSystemInterface::OpenFileMode mode_;
+ bool recursive_;
const fileapi::AsyncFileUtil::StatusCallback callback_;
- DISALLOW_COPY_AND_ASSIGN(CloseFile);
+ DISALLOW_COPY_AND_ASSIGN(DeleteEntry);
};
} // 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_DELETE_ENTRY_H_

Powered by Google App Engine
This is Rietveld 408576698