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

Side by Side Diff: chrome/browser/chromeos/extensions/file_manager/private_api_mount.cc

Issue 2201023002: Change access mode of disk devices when mounting based on config. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo. Created 4 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/file_manager/fake_disk_mount_manager.h » ('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_manager/private_api_mount.h" 5 #include "chrome/browser/chromeos/extensions/file_manager/private_api_mount.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/format_macros.h" 10 #include "base/format_macros.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 156
157 // Pass back the actual source path of the mount point. 157 // Pass back the actual source path of the mount point.
158 SetResult(base::MakeUnique<base::StringValue>(file_path.AsUTF8Unsafe())); 158 SetResult(base::MakeUnique<base::StringValue>(file_path.AsUTF8Unsafe()));
159 SendResponse(true); 159 SendResponse(true);
160 160
161 // MountPath() takes a std::string. 161 // MountPath() takes a std::string.
162 DiskMountManager* disk_mount_manager = DiskMountManager::GetInstance(); 162 DiskMountManager* disk_mount_manager = DiskMountManager::GetInstance();
163 disk_mount_manager->MountPath( 163 disk_mount_manager->MountPath(
164 file_path.AsUTF8Unsafe(), 164 file_path.AsUTF8Unsafe(),
165 base::FilePath(display_name.Extension()).AsUTF8Unsafe(), 165 base::FilePath(display_name.Extension()).AsUTF8Unsafe(),
166 display_name.AsUTF8Unsafe(), 166 display_name.AsUTF8Unsafe(), chromeos::MOUNT_TYPE_ARCHIVE,
167 chromeos::MOUNT_TYPE_ARCHIVE); 167 chromeos::MOUNT_ACCESS_MODE_READ_WRITE);
168 } 168 }
169 169
170 bool FileManagerPrivateRemoveMountFunction::RunAsync() { 170 bool FileManagerPrivateRemoveMountFunction::RunAsync() {
171 using file_manager_private::RemoveMount::Params; 171 using file_manager_private::RemoveMount::Params;
172 const std::unique_ptr<Params> params(Params::Create(*args_)); 172 const std::unique_ptr<Params> params(Params::Create(*args_));
173 EXTENSION_FUNCTION_VALIDATE(params); 173 EXTENSION_FUNCTION_VALIDATE(params);
174 174
175 drive::EventLogger* logger = file_manager::util::GetLogger(GetProfile()); 175 drive::EventLogger* logger = file_manager::util::GetLogger(GetProfile());
176 if (logger) { 176 if (logger) {
177 logger->Log(logging::LOG_INFO, "%s[%d] called. (volume_id: '%s')", name(), 177 logger->Log(logging::LOG_INFO, "%s[%d] called. (volume_id: '%s')", name(),
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 name(), request_id(), log_string.c_str(), result.size()); 246 name(), request_id(), log_string.c_str(), result.size());
247 } 247 }
248 248
249 results_ = 249 results_ =
250 file_manager_private::GetVolumeMetadataList::Results::Create(result); 250 file_manager_private::GetVolumeMetadataList::Results::Create(result);
251 SendResponse(true); 251 SendResponse(true);
252 return true; 252 return true;
253 } 253 }
254 254
255 } // namespace extensions 255 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/file_manager/fake_disk_mount_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698