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

Issue 2401963002: Remount all removable storage devices upon policy update (Closed)

Created:
4 years, 2 months ago by yamaguchi
Modified:
4 years, 1 month ago
Reviewers:
hirono
CC:
chromium-reviews, hashimoto+watch_chromium.org, yamaguchi+watch_chromium.org, oka+watch_chromium.org, rginda+watch_chromium.org, mtomasz+watch_chromium.org, oshima+watch_chromium.org, fukino+watch_chromium.org, davemoore+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remount all removable storage devices when received update of ExternalStorageReadOnly policy. The end-to-end test can be done manually in this way: 1. Enter public session mode. See https://support.google.com/chrome/a/answer/3017014?hl=en 2. Plug a removable storage / MTP device. 3. Change the policy in Google admin and make sure it is reloaded at chrome://policy. 4. Check if the device is mounted RO/RW accordingly by right-clicking it in Files app. When the device is read-only, it the "format drive" menu will be grayed out. This change depends on https://chromium-review.googlesource.com/#/c/390410/ in chromeos. (which is already merged to trunk) BUG=642247 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation TEST=manual test as described above Committed: https://crrev.com/28bce536b995429341b58d5bb6a826228bb6ef15 Cr-Commit-Position: refs/heads/master@{#431206}

Patch Set 1 #

Patch Set 2 : Add unit test for DiskMountManager. #

Patch Set 3 : Sync to head. #

Patch Set 4 : sync to head. #

Patch Set 5 : Do not remount RO devices. Store RO option to disks object. #

Patch Set 6 : sync to head #

Patch Set 7 : Revise test. #

Patch Set 8 : Sync to head #

Patch Set 9 : sync to 2451603002 #

Patch Set 10 : Sync to submitted dependency CL. #

Patch Set 11 : Sync to head #

Patch Set 12 : Fix regression bug. #

Patch Set 13 : Fix indent #

Total comments: 2

Patch Set 14 : User ASSERT_EQ to avoid test crash. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -2 lines) Patch
M chrome/browser/chromeos/file_manager/volume_manager.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/file_manager/volume_manager.cc View 1 2 3 4 5 6 7 2 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/file_manager/volume_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +19 lines, -0 lines 0 comments Download
M ui/file_manager/file_manager/background/js/volume_manager_impl.js View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +8 lines, -2 lines 0 comments Download

Messages

Total messages: 46 (38 generated)
yamaguchi
4 years, 1 month ago (2016-11-09 11:46:06 UTC) #28
yamaguchi
ptal
4 years, 1 month ago (2016-11-10 02:13:12 UTC) #31
yamaguchi
4 years, 1 month ago (2016-11-10 05:37:33 UTC) #33
hirono
lgtm with a nit! https://codereview.chromium.org/2401963002/diff/230001/chrome/browser/chromeos/file_manager/volume_manager_unittest.cc File chrome/browser/chromeos/file_manager/volume_manager_unittest.cc (right): https://codereview.chromium.org/2401963002/diff/230001/chrome/browser/chromeos/file_manager/volume_manager_unittest.cc#newcode798 chrome/browser/chromeos/file_manager/volume_manager_unittest.cc:798: EXPECT_EQ(2U, disk_mount_manager_->remount_all_requests().size()); nit: Should be ...
4 years, 1 month ago (2016-11-10 07:12:24 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2401963002/250001
4 years, 1 month ago (2016-11-10 07:54:58 UTC) #41
commit-bot: I haz the power
Committed patchset #14 (id:250001)
4 years, 1 month ago (2016-11-10 07:59:41 UTC) #43
commit-bot: I haz the power
Patchset 14 (id:??) landed as https://crrev.com/28bce536b995429341b58d5bb6a826228bb6ef15 Cr-Commit-Position: refs/heads/master@{#431206}
4 years, 1 month ago (2016-11-10 08:03:43 UTC) #45
yamaguchi
4 years, 1 month ago (2016-11-10 08:44:30 UTC) #46
Message was sent while issue was closed.
https://codereview.chromium.org/2401963002/diff/230001/chrome/browser/chromeo...
File chrome/browser/chromeos/file_manager/volume_manager_unittest.cc (right):

https://codereview.chromium.org/2401963002/diff/230001/chrome/browser/chromeo...
chrome/browser/chromeos/file_manager/volume_manager_unittest.cc:798:
EXPECT_EQ(2U, disk_mount_manager_->remount_all_requests().size());
On 2016/11/10 07:12:24, hirono wrote:
> nit: Should be ASSERT_EQ, because the test will crash at #800 if the size is
> zero.

Done.

Powered by Google App Engine
This is Rietveld 408576698