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
Review-Url: https://codereview.chromium.org/2440443003
Cr-Commit-Position: refs/heads/master@{#427034}
7 files changed