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

Unified Diff: ui/file_manager/file_manager/background/js/volume_manager_impl.js

Issue 2401963002: Remount all removable storage devices upon policy update (Closed)
Patch Set: User ASSERT_EQ to avoid test crash. Created 4 years, 1 month 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 | « chrome/browser/chromeos/file_manager/volume_manager_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/file_manager/background/js/volume_manager_impl.js
diff --git a/ui/file_manager/file_manager/background/js/volume_manager_impl.js b/ui/file_manager/file_manager/background/js/volume_manager_impl.js
index 84f578aa3d0de6afb5ae97dfbaed9a54569de794..e6463becd10114417b7b114c151ee7b8a9418b04 100644
--- a/ui/file_manager/file_manager/background/js/volume_manager_impl.js
+++ b/ui/file_manager/file_manager/background/js/volume_manager_impl.js
@@ -95,8 +95,9 @@ VolumeManagerImpl.prototype.addVolumeMetadata_ = function(volumeMetadata) {
shouldShow = !!volumeInfo.fileSystem;
break;
}
- if (shouldShow &&
- this.volumeInfoList.findIndex(volumeInfo.volumeId) === -1) {
+ if (!shouldShow)
+ return volumeInfo;
+ if (this.volumeInfoList.findIndex(volumeInfo.volumeId) === -1) {
this.volumeInfoList.add(volumeInfo);
// Update the network connection status, because until the drive is
@@ -107,6 +108,11 @@ VolumeManagerImpl.prototype.addVolumeMetadata_ = function(volumeMetadata) {
VolumeManagerCommon.VolumeType.DRIVE) {
this.onDriveConnectionStatusChanged_();
}
+ } else if (volumeMetadata.volumeType ===
+ VolumeManagerCommon.VolumeType.REMOVABLE) {
+ // Update for remounted USB external storage, because they were
+ // remounted to switch read-only policy.
+ this.volumeInfoList.add(volumeInfo);
}
return volumeInfo;
}.bind(this));
« no previous file with comments | « chrome/browser/chromeos/file_manager/volume_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698