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

Issue 2440443003: Preserve the hardware read-only flag in Disk object. (Closed)

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

Description

Preserve the hardware read-only flag in Disk object. The hardware read-only flag is obtained from device enumeration and stored to Disk objects. Existing code overwrites that field when applying read-only policy. However, that information will be needed when we support remounting devices to switch between read-only and read-write mode upon policy update. After this change, Disk objects can distinguish whether a device is mounted read-only because of a read-only hardware or because of the mount option passed to Mount (for ExternalStorageReadOnly policy). TEST=Run chromeos_unittest, unit_tests, and browser_tests. BUG=642247, 655003 Committed: https://crrev.com/eaaad9842eef857da9e5e14b4ee5e6ffe6fe37ef Cr-Commit-Position: refs/heads/master@{#427034}

Patch Set 1 #

Patch Set 2 : Fix build errors. #

Patch Set 3 : Fix build error in file_manager_private_api test. #

Total comments: 8

Patch Set 4 : Put the right value at Disk object construction. #

Total comments: 2

Patch Set 5 : Use auto. #

Total comments: 6

Patch Set 6 : Add comments on some private fields. #

Patch Set 7 : Adjust comment to match with the field name. #

Total comments: 2

Patch Set 8 : Move comments to the constructor args. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+65 lines, -35 lines) Patch
M chrome/browser/chromeos/extensions/file_manager/device_event_router_unittest.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chromeos/extensions/file_manager/file_manager_private_apitest.cc View 1 2 5 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/file_manager/volume_manager_unittest.cc View 1 12 chunks +12 lines, -12 lines 0 comments Download
M chromeos/disks/disk_mount_manager.h View 1 2 3 4 5 6 7 6 chunks +18 lines, -5 lines 0 comments Download
M chromeos/disks/disk_mount_manager.cc View 1 2 3 4 5 6 chunks +14 lines, -12 lines 0 comments Download
M chromeos/disks/disk_mount_manager_unittest.cc View 1 2 3 5 chunks +11 lines, -6 lines 0 comments Download
M chromeos/disks/mock_disk_mount_manager.cc View 1 2 3 4 chunks +4 lines, -0 lines 0 comments Download

Messages

Total messages: 41 (24 generated)
yamaguchi
ptal.
4 years, 2 months ago (2016-10-20 10:34:26 UTC) #15
hashimoto
https://codereview.chromium.org/2440443003/diff/40001/chromeos/disks/disk_mount_manager.cc File chromeos/disks/disk_mount_manager.cc (right): https://codereview.chromium.org/2440443003/diff/40001/chromeos/disks/disk_mount_manager.cc#newcode474 chromeos/disks/disk_mount_manager.cc:474: false, Please make it easy to figure out what ...
4 years, 2 months ago (2016-10-21 07:28:04 UTC) #17
yamaguchi
https://codereview.chromium.org/2440443003/diff/40001/chromeos/disks/disk_mount_manager.cc File chromeos/disks/disk_mount_manager.cc (right): https://codereview.chromium.org/2440443003/diff/40001/chromeos/disks/disk_mount_manager.cc#newcode474 chromeos/disks/disk_mount_manager.cc:474: false, On 2016/10/21 07:28:04, hashimoto wrote: > Please make ...
4 years, 2 months ago (2016-10-21 08:27:03 UTC) #18
hashimoto
lgtm https://codereview.chromium.org/2440443003/diff/60001/chromeos/disks/disk_mount_manager.cc File chromeos/disks/disk_mount_manager.cc (right): https://codereview.chromium.org/2440443003/diff/60001/chromeos/disks/disk_mount_manager.cc#newcode477 chromeos/disks/disk_mount_manager.cc:477: AccessModeMap::iterator access_mode = nit: You can do auto ...
4 years, 2 months ago (2016-10-21 08:39:59 UTC) #19
yamaguchi
https://codereview.chromium.org/2440443003/diff/60001/chromeos/disks/disk_mount_manager.cc File chromeos/disks/disk_mount_manager.cc (right): https://codereview.chromium.org/2440443003/diff/60001/chromeos/disks/disk_mount_manager.cc#newcode477 chromeos/disks/disk_mount_manager.cc:477: AccessModeMap::iterator access_mode = On 2016/10/21 08:39:59, hashimoto wrote: > ...
4 years, 2 months ago (2016-10-21 08:53:04 UTC) #20
hashimoto
lgtm
4 years, 2 months ago (2016-10-21 09:04:43 UTC) #23
yamaguchi
+satorux Will you review and approve the CL, because it contains changes to files under ...
4 years, 2 months ago (2016-10-21 10:03:41 UTC) #27
satorux1
https://codereview.chromium.org/2440443003/diff/80001/chromeos/disks/disk_mount_manager.h File chromeos/disks/disk_mount_manager.h (right): https://codereview.chromium.org/2440443003/diff/80001/chromeos/disks/disk_mount_manager.h#newcode59 chromeos/disks/disk_mount_manager.h:59: bool write_disabled_by_policy, any reason why this should be added ...
4 years, 1 month ago (2016-10-24 01:39:56 UTC) #28
yamaguchi
https://codereview.chromium.org/2440443003/diff/80001/chromeos/disks/disk_mount_manager.h File chromeos/disks/disk_mount_manager.h (right): https://codereview.chromium.org/2440443003/diff/80001/chromeos/disks/disk_mount_manager.h#newcode59 chromeos/disks/disk_mount_manager.h:59: bool write_disabled_by_policy, On 2016/10/24 01:39:55, satorux1 wrote: > any ...
4 years, 1 month ago (2016-10-24 01:53:30 UTC) #29
satorux1
https://codereview.chromium.org/2440443003/diff/80001/chromeos/disks/disk_mount_manager.h File chromeos/disks/disk_mount_manager.h (right): https://codereview.chromium.org/2440443003/diff/80001/chromeos/disks/disk_mount_manager.h#newcode59 chromeos/disks/disk_mount_manager.h:59: bool write_disabled_by_policy, On 2016/10/24 01:53:30, yamaguchi wrote: > On ...
4 years, 1 month ago (2016-10-24 02:00:11 UTC) #30
satorux1
4 years, 1 month ago (2016-10-24 02:00:12 UTC) #31
yamaguchi
https://codereview.chromium.org/2440443003/diff/80001/chromeos/disks/disk_mount_manager.h File chromeos/disks/disk_mount_manager.h (right): https://codereview.chromium.org/2440443003/diff/80001/chromeos/disks/disk_mount_manager.h#newcode59 chromeos/disks/disk_mount_manager.h:59: bool write_disabled_by_policy, On 2016/10/24 02:00:11, satorux1 wrote: > On ...
4 years, 1 month ago (2016-10-24 04:43:23 UTC) #32
satorux1
lgtm with a request https://codereview.chromium.org/2440443003/diff/120001/chromeos/disks/disk_mount_manager.h File chromeos/disks/disk_mount_manager.h (right): https://codereview.chromium.org/2440443003/diff/120001/chromeos/disks/disk_mount_manager.h#newcode172 chromeos/disks/disk_mount_manager.h:172: bool write_disabled_by_policy_; Maybe move these ...
4 years, 1 month ago (2016-10-24 05:07:57 UTC) #33
yamaguchi
https://codereview.chromium.org/2440443003/diff/120001/chromeos/disks/disk_mount_manager.h File chromeos/disks/disk_mount_manager.h (right): https://codereview.chromium.org/2440443003/diff/120001/chromeos/disks/disk_mount_manager.h#newcode172 chromeos/disks/disk_mount_manager.h:172: bool write_disabled_by_policy_; On 2016/10/24 05:07:57, satorux1 wrote: > Maybe ...
4 years, 1 month ago (2016-10-24 07:01:06 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/2440443003/140001
4 years, 1 month ago (2016-10-24 07:41:43 UTC) #37
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 1 month ago (2016-10-24 09:46:44 UTC) #39
commit-bot: I haz the power
4 years, 1 month ago (2016-10-24 09:55:23 UTC) #41
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/eaaad9842eef857da9e5e14b4ee5e6ffe6fe37ef
Cr-Commit-Position: refs/heads/master@{#427034}

Powered by Google App Engine
This is Rietveld 408576698