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

Unified Diff: chrome/browser/chromeos/file_manager/volume_manager.cc

Issue 190153003: Respect disabling removable devices policy for enterprise users. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/file_manager/volume_manager.cc
diff --git a/chrome/browser/chromeos/file_manager/volume_manager.cc b/chrome/browser/chromeos/file_manager/volume_manager.cc
index ef0e3b3bb2bd55a0023b77b76ee1527ed3c4691a..d1af9fa5016d9ea69a7f124cddc4c5efa8552230 100644
--- a/chrome/browser/chromeos/file_manager/volume_manager.cc
+++ b/chrome/browser/chromeos/file_manager/volume_manager.cc
@@ -632,6 +632,12 @@ void VolumeManager::DoMountEvent(chromeos::MountError error_code,
return;
}
+ // Filter out removable disks if forbidden by policy for this profile.
+ if (volume_info.type == VOLUME_TYPE_REMOVABLE_DISK_PARTITION &&
+ profile_->GetPrefs()->GetBoolean(prefs::kExternalStorageDisabled)) {
+ return;
+ }
+
if (error_code == chromeos::MOUNT_ERROR_NONE || volume_info.mount_condition)
mounted_volumes_[volume_info.volume_id] = volume_info;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698