summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkinaba@chromium.org <kinaba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-01 10:55:04 +0000
committerkinaba@chromium.org <kinaba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-01 10:55:04 +0000
commit2968bc0b961bd093a9cf7a92bb26b5548ec944e4 (patch)
treec543a9ac78823db3ca69f86797b459487e29aa91
parentc17ecbe4b82d786d911cc98f890d61d1d9a40b1f (diff)
downloadchromium_src-2968bc0b961bd093a9cf7a92bb26b5548ec944e4.zip
chromium_src-2968bc0b961bd093a9cf7a92bb26b5548ec944e4.tar.gz
chromium_src-2968bc0b961bd093a9cf7a92bb26b5548ec944e4.tar.bz2
Files.app: Do not mount MTP volumes if policy disables external storages.
BUG=367001 Review URL: https://codereview.chromium.org/267573006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267513 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/chromeos/file_manager/volume_manager.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/chrome/browser/chromeos/file_manager/volume_manager.cc b/chrome/browser/chromeos/file_manager/volume_manager.cc
index 619b9b1..915ca18 100644
--- a/chrome/browser/chromeos/file_manager/volume_manager.cc
+++ b/chrome/browser/chromeos/file_manager/volume_manager.cc
@@ -712,6 +712,8 @@ void VolumeManager::OnRemovableStorageAttached(
const storage_monitor::StorageInfo& info) {
if (!storage_monitor::StorageInfo::IsMTPDevice(info.device_id()))
return;
+ if (profile_->GetPrefs()->GetBoolean(prefs::kExternalStorageDisabled))
+ return;
const base::FilePath path = base::FilePath::FromUTF8Unsafe(info.location());
const std::string fsid = GetMountPointNameForMediaStorage(info);