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

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

Issue 440653003: [fsp] Add support for aborting running operations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed DCHECKs. Created 6 years, 4 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/abort.h
diff --git a/chrome/browser/chromeos/file_system_provider/operations/create_file.h b/chrome/browser/chromeos/file_system_provider/operations/abort.h
similarity index 74%
copy from chrome/browser/chromeos/file_system_provider/operations/create_file.h
copy to chrome/browser/chromeos/file_system_provider/operations/abort.h
index 4c9af21d232bab14c89c467f04057c0cc8c526e2..9f7b2b2fdea11c35db925970c0f239194a0acba9 100644
--- a/chrome/browser/chromeos/file_system_provider/operations/create_file.h
+++ b/chrome/browser/chromeos/file_system_provider/operations/abort.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_CREATE_FILE_H_
-#define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_CREATE_FILE_H_
+#ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_ABORT_H_
+#define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_ABORT_H_
#include "base/files/file.h"
#include "base/memory/scoped_ptr.h"
@@ -25,15 +25,14 @@ namespace chromeos {
namespace file_system_provider {
namespace operations {
-// 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 {
+// Aborts an operation. Created per request.
+class Abort : public Operation {
public:
- CreateFile(extensions::EventRouter* event_router,
- const ProvidedFileSystemInfo& file_system_info,
- const base::FilePath& file_path,
- const fileapi::AsyncFileUtil::StatusCallback& callback);
- virtual ~CreateFile();
+ Abort(extensions::EventRouter* event_router,
+ const ProvidedFileSystemInfo& file_system_info,
+ int operation_request_id,
+ const fileapi::AsyncFileUtil::StatusCallback& callback);
+ virtual ~Abort();
// Operation overrides.
virtual bool Execute(int request_id) OVERRIDE;
@@ -45,14 +44,14 @@ class CreateFile : public Operation {
base::File::Error error) OVERRIDE;
private:
- base::FilePath file_path_;
+ int operation_request_id_;
const fileapi::AsyncFileUtil::StatusCallback callback_;
- DISALLOW_COPY_AND_ASSIGN(CreateFile);
+ DISALLOW_COPY_AND_ASSIGN(Abort);
};
} // namespace operations
} // namespace file_system_provider
} // namespace chromeos
-#endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_CREATE_FILE_H_
+#endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_ABORT_H_

Powered by Google App Engine
This is Rietveld 408576698