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

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

Issue 329483002: [fsp] Group arguments for API methods and events in dictionaries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleaned up. 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/file_system_provider/operations/close_file.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 097dfafc1b76d534a7d8e20ee5e1c5e63efa3bce..5bd2b0a8ea3473ffba0c01f8013334b05400eb82 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
@@ -27,7 +27,7 @@ bool FileSystemProviderMountFunction::RunSync() {
EXTENSION_FUNCTION_VALIDATE(params);
// It's an error if the file system Id is empty.
- if (params->file_system_id.empty()) {
+ if (params->options.file_system_id.empty()) {
base::ListValue* result = new base::ListValue();
result->Append(CreateError(kSecurityErrorName, kEmptyIdErrorMessage));
SetResult(result);
@@ -35,7 +35,7 @@ bool FileSystemProviderMountFunction::RunSync() {
}
// It's an error if the display name is empty.
- if (params->display_name.empty()) {
+ if (params->options.display_name.empty()) {
base::ListValue* result = new base::ListValue();
result->Append(CreateError(kSecurityErrorName,
kEmptyNameErrorMessage));
@@ -49,8 +49,9 @@ bool FileSystemProviderMountFunction::RunSync() {
return false;
// TODO(mtomasz): Pass more detailed errors, rather than just a bool.
- if (!service->MountFileSystem(
- extension_id(), params->file_system_id, params->display_name)) {
+ if (!service->MountFileSystem(extension_id(),
+ params->options.file_system_id,
+ params->options.display_name)) {
base::ListValue* result = new base::ListValue();
result->Append(CreateError(kSecurityErrorName, kMountFailedErrorMessage));
SetResult(result);
@@ -72,7 +73,8 @@ bool FileSystemProviderUnmountFunction::RunSync() {
if (!service)
return false;
- if (!service->UnmountFileSystem(extension_id(), params->file_system_id)) {
+ if (!service->UnmountFileSystem(extension_id(),
+ params->options.file_system_id)) {
// TODO(mtomasz): Pass more detailed errors, rather than just a bool.
base::ListValue* result = new base::ListValue();
result->Append(CreateError(kSecurityErrorName, kUnmountFailedErrorMessage));
« no previous file with comments | « no previous file | chrome/browser/chromeos/file_system_provider/operations/close_file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698