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

Side by Side Diff: chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.cc

Issue 372163006: [fsp] Add an option for mounting in R/W mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed tests. Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/file_manager/volume_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/extensions/file_system_provider/file_system_pr ovider_api.h" 5 #include "chrome/browser/chromeos/extensions/file_system_provider/file_system_pr ovider_api.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 } 45 }
46 46
47 Service* service = Service::Get(GetProfile()); 47 Service* service = Service::Get(GetProfile());
48 DCHECK(service); 48 DCHECK(service);
49 if (!service) 49 if (!service)
50 return false; 50 return false;
51 51
52 // TODO(mtomasz): Pass more detailed errors, rather than just a bool. 52 // TODO(mtomasz): Pass more detailed errors, rather than just a bool.
53 if (!service->MountFileSystem(extension_id(), 53 if (!service->MountFileSystem(extension_id(),
54 params->options.file_system_id, 54 params->options.file_system_id,
55 params->options.display_name)) { 55 params->options.display_name,
56 params->options.writable)) {
56 base::ListValue* result = new base::ListValue(); 57 base::ListValue* result = new base::ListValue();
57 result->Append(CreateError(kSecurityErrorName, kMountFailedErrorMessage)); 58 result->Append(CreateError(kSecurityErrorName, kMountFailedErrorMessage));
58 SetResult(result); 59 SetResult(result);
59 return true; 60 return true;
60 } 61 }
61 62
62 base::ListValue* result = new base::ListValue(); 63 base::ListValue* result = new base::ListValue();
63 SetResult(result); 64 SetResult(result);
64 return true; 65 return true;
65 } 66 }
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 using api::file_system_provider_internal::OperationRequestedError::Params; 154 using api::file_system_provider_internal::OperationRequestedError::Params;
154 scoped_ptr<Params> params(Params::Create(*args_)); 155 scoped_ptr<Params> params(Params::Create(*args_));
155 EXTENSION_FUNCTION_VALIDATE(params); 156 EXTENSION_FUNCTION_VALIDATE(params);
156 157
157 const base::File::Error error = ProviderErrorToFileError(params->error); 158 const base::File::Error error = ProviderErrorToFileError(params->error);
158 RejectRequest(RequestValue::CreateForOperationError(params.Pass()), error); 159 RejectRequest(RequestValue::CreateForOperationError(params.Pass()), error);
159 return true; 160 return true;
160 } 161 }
161 162
162 } // namespace extensions 163 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/file_manager/volume_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698