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

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

Issue 624903002: [fsp] Group arguments for mounting into a struct. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a bug. Created 6 years, 2 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/fileapi/file_stream_reader_unittest.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 66f44a190c19214c72ca3c9f52569326a5f8a721..1be0316818ccc2439175f2c1f8c28b666e9a928f 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
@@ -18,6 +18,7 @@
#include "chrome/common/extensions/api/file_system_provider.h"
#include "chrome/common/extensions/api/file_system_provider_internal.h"
+using chromeos::file_system_provider::MountOptions;
using chromeos::file_system_provider::ProvidedFileSystemInfo;
using chromeos::file_system_provider::ProvidedFileSystemInterface;
using chromeos::file_system_provider::RequestValue;
@@ -59,12 +60,14 @@ bool FileSystemProviderMountFunction::RunSync() {
if (!service)
return false;
+ MountOptions options;
+ options.file_system_id = params->options.file_system_id;
+ options.display_name = params->options.display_name;
+ options.writable = params->options.writable;
+ options.supports_notify_tag = params->options.supports_notify_tag;
+
// TODO(mtomasz): Pass more detailed errors, rather than just a bool.
- if (!service->MountFileSystem(extension_id(),
- params->options.file_system_id,
- params->options.display_name,
- params->options.writable,
- params->options.supports_notify_tag)) {
+ if (!service->MountFileSystem(extension_id(), options)) {
base::ListValue* const result = new base::ListValue();
result->Append(CreateError(kSecurityErrorName, kMountFailedErrorMessage));
SetResult(result);
« no previous file with comments | « no previous file | chrome/browser/chromeos/file_system_provider/fileapi/file_stream_reader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698