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

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

Issue 210803003: [fsp] Decouple file_service_provider::Service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed tests. Created 6 years, 8 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/extensions/file_system_provider/file_system_provider_api.cc
diff --git a/chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.cc b/chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.cc
index 29b08b26c0724829f2facb3b4ccf3618dd6a746d..a8d88a11f0c1b34ab3223db770fd20d5e5a1733f 100644
--- a/chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.cc
+++ b/chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.cc
@@ -119,7 +119,6 @@ bool FileSystemProviderMountFunction::RunImpl() {
// Don't append an error on success.
SetResult(result);
- SendResponse(true);
return true;
}
@@ -142,7 +141,6 @@ bool FileSystemProviderUnmountFunction::RunImpl() {
base::ListValue* result = new base::ListValue();
SetResult(result);
- SendResponse(true);
return true;
}
@@ -155,11 +153,12 @@ bool FileSystemProviderInternalUnmountRequestedSuccessFunction::RunImpl() {
chromeos::file_system_provider::Service::Get(GetProfile());
DCHECK(service);
- if (!service->FulfillRequest(extension_id(),
- params->file_system_id,
- params->request_id,
- scoped_ptr<base::DictionaryValue>(),
- false /* has_more */)) {
+ if (!service->request_manager()->FulfillRequest(
+ extension_id(),
+ params->file_system_id,
+ params->request_id,
+ scoped_ptr<base::DictionaryValue>(),
+ false /* has_more */)) {
// TODO(mtomasz): Pass more detailed errors, rather than just a bool.
base::ListValue* result = new base::ListValue();
result->Append(
@@ -170,7 +169,6 @@ bool FileSystemProviderInternalUnmountRequestedSuccessFunction::RunImpl() {
base::ListValue* result = new base::ListValue();
SetResult(result);
- SendResponse(true);
return true;
}
@@ -191,10 +189,11 @@ bool FileSystemProviderInternalUnmountRequestedErrorFunction::RunImpl() {
const api::file_system_provider::ProviderError provider_error =
api::file_system_provider::ParseProviderError(params->error);
- if (!service->RejectRequest(extension_id(),
- params->file_system_id,
- params->request_id,
- ProviderErrorToFileError(provider_error))) {
+ if (!service->request_manager()->RejectRequest(
+ extension_id(),
+ params->file_system_id,
+ params->request_id,
+ ProviderErrorToFileError(provider_error))) {
// TODO(mtomasz): Pass more detailed errors, rather than just a bool.
base::ListValue* result = new base::ListValue();
result->Append(
@@ -205,7 +204,6 @@ bool FileSystemProviderInternalUnmountRequestedErrorFunction::RunImpl() {
base::ListValue* result = new base::ListValue();
SetResult(result);
- SendResponse(true);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698