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

Unified Diff: trunk/src/chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.cc

Issue 342003004: Revert 277929 "[fsp] Cleanup handling errors for operation reque..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 6 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: trunk/src/chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.cc
===================================================================
--- trunk/src/chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.cc (revision 278185)
+++ trunk/src/chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.cc (working copy)
@@ -97,6 +97,15 @@
return true;
}
+bool FileSystemProviderInternalUnmountRequestedErrorFunction::RunWhenValid() {
+ using api::file_system_provider_internal::UnmountRequestedError::Params;
+ const scoped_ptr<Params> params(Params::Create(*args_));
+ EXTENSION_FUNCTION_VALIDATE(params);
+
+ RejectRequest(ProviderErrorToFileError(params->error));
+ return true;
+}
+
bool
FileSystemProviderInternalGetMetadataRequestedSuccessFunction::RunWhenValid() {
using api::file_system_provider_internal::GetMetadataRequestedSuccess::Params;
@@ -108,6 +117,16 @@
return true;
}
+bool
+FileSystemProviderInternalGetMetadataRequestedErrorFunction::RunWhenValid() {
+ using api::file_system_provider_internal::GetMetadataRequestedError::Params;
+ const scoped_ptr<Params> params(Params::Create(*args_));
+ EXTENSION_FUNCTION_VALIDATE(params);
+
+ RejectRequest(ProviderErrorToFileError(params->error));
+ return true;
+}
+
bool FileSystemProviderInternalReadDirectoryRequestedSuccessFunction::
RunWhenValid() {
using api::file_system_provider_internal::ReadDirectoryRequestedSuccess::
@@ -122,6 +141,16 @@
}
bool
+FileSystemProviderInternalReadDirectoryRequestedErrorFunction::RunWhenValid() {
+ using api::file_system_provider_internal::ReadDirectoryRequestedError::Params;
+ const scoped_ptr<Params> params(Params::Create(*args_));
+ EXTENSION_FUNCTION_VALIDATE(params);
+
+ RejectRequest(ProviderErrorToFileError(params->error));
+ return true;
+}
+
+bool
FileSystemProviderInternalOpenFileRequestedSuccessFunction::RunWhenValid() {
using api::file_system_provider_internal::OpenFileRequestedSuccess::Params;
scoped_ptr<Params> params(Params::Create(*args_));
@@ -132,6 +161,15 @@
return true;
}
+bool FileSystemProviderInternalOpenFileRequestedErrorFunction::RunWhenValid() {
+ using api::file_system_provider_internal::OpenFileRequestedError::Params;
+ const scoped_ptr<Params> params(Params::Create(*args_));
+ EXTENSION_FUNCTION_VALIDATE(params);
+
+ RejectRequest(ProviderErrorToFileError(params->error));
+ return true;
+}
+
bool
FileSystemProviderInternalCloseFileRequestedSuccessFunction::RunWhenValid() {
using api::file_system_provider_internal::CloseFileRequestedSuccess::Params;
@@ -143,6 +181,15 @@
return true;
}
+bool FileSystemProviderInternalCloseFileRequestedErrorFunction::RunWhenValid() {
+ using api::file_system_provider_internal::CloseFileRequestedError::Params;
+ const scoped_ptr<Params> params(Params::Create(*args_));
+ EXTENSION_FUNCTION_VALIDATE(params);
+
+ RejectRequest(ProviderErrorToFileError(params->error));
+ return true;
+}
+
bool
FileSystemProviderInternalReadFileRequestedSuccessFunction::RunWhenValid() {
using api::file_system_provider_internal::ReadFileRequestedSuccess::Params;
@@ -155,12 +202,12 @@
return true;
}
-bool FileSystemProviderInternalOperationRequestedErrorFunction::RunWhenValid() {
- using api::file_system_provider_internal::OperationRequestedError::Params;
- scoped_ptr<Params> params(Params::Create(*args_));
+bool FileSystemProviderInternalReadFileRequestedErrorFunction::RunWhenValid() {
+ using api::file_system_provider_internal::ReadFileRequestedError::Params;
+ const scoped_ptr<Params> params(Params::Create(*args_));
EXTENSION_FUNCTION_VALIDATE(params);
- RejectRequest(RequestValue::CreateForOperationError(params.Pass()),
- ProviderErrorToFileError(params->error));
+
+ RejectRequest(ProviderErrorToFileError(params->error));
return true;
}

Powered by Google App Engine
This is Rietveld 408576698