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

Side by Side Diff: trunk/src/chrome/browser/chromeos/file_manager/volume_manager.cc

Issue 389243002: Revert 282900 "Revert 282890 "[fsp] Add an option for mounting i..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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
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/file_manager/volume_manager.h" 5 #include "chrome/browser/chromeos/file_manager/volume_manager.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 const chromeos::file_system_provider::ProvidedFileSystemInfo& 213 const chromeos::file_system_provider::ProvidedFileSystemInfo&
214 file_system_info) { 214 file_system_info) {
215 VolumeInfo volume_info; 215 VolumeInfo volume_info;
216 volume_info.file_system_id = file_system_info.file_system_id(); 216 volume_info.file_system_id = file_system_info.file_system_id();
217 volume_info.extension_id = file_system_info.extension_id(); 217 volume_info.extension_id = file_system_info.extension_id();
218 volume_info.volume_label = file_system_info.display_name(); 218 volume_info.volume_label = file_system_info.display_name();
219 volume_info.type = VOLUME_TYPE_PROVIDED; 219 volume_info.type = VOLUME_TYPE_PROVIDED;
220 volume_info.mount_path = file_system_info.mount_path(); 220 volume_info.mount_path = file_system_info.mount_path();
221 volume_info.mount_condition = chromeos::disks::MOUNT_CONDITION_NONE; 221 volume_info.mount_condition = chromeos::disks::MOUNT_CONDITION_NONE;
222 volume_info.is_parent = true; 222 volume_info.is_parent = true;
223 volume_info.is_read_only = true; 223 volume_info.is_read_only = !file_system_info.writable();
224 volume_info.volume_id = GenerateVolumeId(volume_info); 224 volume_info.volume_id = GenerateVolumeId(volume_info);
225 return volume_info; 225 return volume_info;
226 } 226 }
227 227
228 std::string GetMountPointNameForMediaStorage( 228 std::string GetMountPointNameForMediaStorage(
229 const storage_monitor::StorageInfo& info) { 229 const storage_monitor::StorageInfo& info) {
230 std::string name(kFileManagerMTPMountNamePrefix); 230 std::string name(kFileManagerMTPMountNamePrefix);
231 name += info.device_id(); 231 name += info.device_id();
232 return name; 232 return name;
233 } 233 }
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 return; 853 return;
854 if (error_code == chromeos::MOUNT_ERROR_NONE) 854 if (error_code == chromeos::MOUNT_ERROR_NONE)
855 mounted_volumes_.erase(volume_info.volume_id); 855 mounted_volumes_.erase(volume_info.volume_id);
856 856
857 FOR_EACH_OBSERVER(VolumeManagerObserver, 857 FOR_EACH_OBSERVER(VolumeManagerObserver,
858 observers_, 858 observers_,
859 OnVolumeUnmounted(error_code, volume_info)); 859 OnVolumeUnmounted(error_code, volume_info));
860 } 860 }
861 861
862 } // namespace file_manager 862 } // namespace file_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698