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

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

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.cc
diff --git a/chrome/browser/chromeos/file_system_provider/operations/close_file.cc b/chrome/browser/chromeos/file_system_provider/operations/abort.cc
similarity index 50%
copy from chrome/browser/chromeos/file_system_provider/operations/close_file.cc
copy to chrome/browser/chromeos/file_system_provider/operations/abort.cc
index ad977368a03d6a85dda7c73ae502b9e6e50669f3..8c488f97d3575b7462a98dff8731041dffe1e5ee 100644
--- a/chrome/browser/chromeos/file_system_provider/operations/close_file.cc
+++ b/chrome/browser/chromeos/file_system_provider/operations/abort.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/chromeos/file_system_provider/operations/close_file.h"
+#include "chrome/browser/chromeos/file_system_provider/operations/abort.h"
#include <string>
@@ -13,37 +13,37 @@ namespace chromeos {
namespace file_system_provider {
namespace operations {
-CloseFile::CloseFile(extensions::EventRouter* event_router,
- const ProvidedFileSystemInfo& file_system_info,
- int open_request_id,
- const fileapi::AsyncFileUtil::StatusCallback& callback)
+Abort::Abort(extensions::EventRouter* event_router,
+ const ProvidedFileSystemInfo& file_system_info,
+ int operation_request_id,
+ const fileapi::AsyncFileUtil::StatusCallback& callback)
: Operation(event_router, file_system_info),
- open_request_id_(open_request_id),
+ operation_request_id_(operation_request_id),
callback_(callback) {
}
-CloseFile::~CloseFile() {
+Abort::~Abort() {
}
-bool CloseFile::Execute(int request_id) {
+bool Abort::Execute(int request_id) {
scoped_ptr<base::DictionaryValue> values(new base::DictionaryValue);
- values->SetInteger("openRequestId", open_request_id_);
+ values->SetInteger("operationRequestId", operation_request_id_);
return SendEvent(
request_id,
- extensions::api::file_system_provider::OnCloseFileRequested::kEventName,
+ extensions::api::file_system_provider::OnAbortRequested::kEventName,
values.Pass());
}
-void CloseFile::OnSuccess(int /* request_id */,
- scoped_ptr<RequestValue> result,
- bool has_more) {
+void Abort::OnSuccess(int /* request_id */,
+ scoped_ptr<RequestValue> /* result */,
+ bool has_more) {
callback_.Run(base::File::FILE_OK);
}
-void CloseFile::OnError(int /* request_id */,
- scoped_ptr<RequestValue> /* result */,
- base::File::Error error) {
+void Abort::OnError(int /* request_id */,
+ scoped_ptr<RequestValue> /* result */,
+ base::File::Error error) {
callback_.Run(error);
}

Powered by Google App Engine
This is Rietveld 408576698