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

Issue 2451713002: Propagate the read_only_hardware flag of volumes to js. (Closed)

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

Description

Propagate the read_only_hardware flag of volumes to js. Only for removable disk partitions. The property will be used to distinguish between write-protect devices and restricted write access by the policy. UI code will be able to provide better messages based on that. BUG=643693, 655003 TEST=manual test. Deploy to a device and set breakpoint in backgroun_script.js at the beginning of DeviceHandler.prototype.onMountCompleted(). See event.volumeMetadata has isReadoOnlyHardware value reflecting the attached device. Committed: https://crrev.com/dd19a48cddc73cdfea90e644ad05084aeb75ffb0 Cr-Commit-Position: refs/heads/master@{#429223}

Patch Set 1 #

Patch Set 2 : Update externs .js file manually. Fix browser_test. #

Patch Set 3 : Fix test case to cover RO device by policy. Rename test data field to match the counterpart in Disk. #

Patch Set 4 : Apply default value for others than removable disk volume. #

Total comments: 4

Patch Set 5 : Describe example situation where the two 'read_only' fields holds different values. #

Patch Set 6 : Fix comment. #

Total comments: 6

Patch Set 7 : Rename fields. Fill the field explicitly only for storage patitions. #

Total comments: 2

Patch Set 8 : Rename the field name to is_read_only_removable_device, as it's only valid for removable devices. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -6 lines) Patch
M chrome/browser/chromeos/extensions/file_manager/file_manager_private_apitest.cc View 1 2 4 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/extensions/file_manager/private_api_util.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/file_manager/volume_manager.h View 1 2 3 4 5 6 7 2 chunks +16 lines, -1 line 0 comments Download
M chrome/browser/chromeos/file_manager/volume_manager.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/file_manager_private.idl View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/file_browser/mount_test/test.js View 1 2 3 4 5 6 7 7 chunks +8 lines, -1 line 0 comments Download
M third_party/closure_compiler/externs/file_manager_private.js View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 51 (35 generated)
yamaguchi
ptal
4 years, 1 month ago (2016-10-26 06:13:10 UTC) #20
fukino
https://codereview.chromium.org/2451713002/diff/60001/chrome/browser/chromeos/file_manager/volume_manager.cc File chrome/browser/chromeos/file_manager/volume_manager.cc (right): https://codereview.chromium.org/2451713002/diff/60001/chrome/browser/chromeos/file_manager/volume_manager.cc#newcode157 chrome/browser/chromeos/file_manager/volume_manager.cc:157: watchable_(false) {} nit: looks unnecessary change (the style is ...
4 years, 1 month ago (2016-10-26 07:23:32 UTC) #21
yamaguchi
https://codereview.chromium.org/2451713002/diff/60001/chrome/browser/chromeos/file_manager/volume_manager.cc File chrome/browser/chromeos/file_manager/volume_manager.cc (right): https://codereview.chromium.org/2451713002/diff/60001/chrome/browser/chromeos/file_manager/volume_manager.cc#newcode157 chrome/browser/chromeos/file_manager/volume_manager.cc:157: watchable_(false) {} On 2016/10/26 07:23:31, fukino wrote: > nit: ...
4 years, 1 month ago (2016-10-26 11:14:20 UTC) #24
fukino
https://codereview.chromium.org/2451713002/diff/100001/chrome/browser/chromeos/file_manager/volume_manager.cc File chrome/browser/chromeos/file_manager/volume_manager.cc (right): https://codereview.chromium.org/2451713002/diff/100001/chrome/browser/chromeos/file_manager/volume_manager.cc#newcode215 chrome/browser/chromeos/file_manager/volume_manager.cc:215: volume->is_read_only_ = volume->is_read_only_hardware_ = Should is_read_only_hardware_ be true? The ...
4 years, 1 month ago (2016-10-27 05:27:34 UTC) #25
yamaguchi
https://codereview.chromium.org/2451713002/diff/100001/chrome/browser/chromeos/file_manager/volume_manager.cc File chrome/browser/chromeos/file_manager/volume_manager.cc (right): https://codereview.chromium.org/2451713002/diff/100001/chrome/browser/chromeos/file_manager/volume_manager.cc#newcode215 chrome/browser/chromeos/file_manager/volume_manager.cc:215: volume->is_read_only_ = volume->is_read_only_hardware_ = On 2016/10/27 05:27:34, fukino wrote: ...
4 years, 1 month ago (2016-10-27 07:32:54 UTC) #28
fukino
https://codereview.chromium.org/2451713002/diff/120001/chrome/browser/chromeos/file_manager/volume_manager.h File chrome/browser/chromeos/file_manager/volume_manager.h (right): https://codereview.chromium.org/2451713002/diff/120001/chrome/browser/chromeos/file_manager/volume_manager.h#newcode128 chrome/browser/chromeos/file_manager/volume_manager.h:128: bool is_read_only_device() const { return is_read_only_device_; } This field ...
4 years, 1 month ago (2016-10-27 11:39:09 UTC) #31
yamaguchi
https://codereview.chromium.org/2451713002/diff/120001/chrome/browser/chromeos/file_manager/volume_manager.h File chrome/browser/chromeos/file_manager/volume_manager.h (right): https://codereview.chromium.org/2451713002/diff/120001/chrome/browser/chromeos/file_manager/volume_manager.h#newcode128 chrome/browser/chromeos/file_manager/volume_manager.h:128: bool is_read_only_device() const { return is_read_only_device_; } On 2016/10/27 ...
4 years, 1 month ago (2016-10-27 12:58:24 UTC) #34
fukino
lgtm
4 years, 1 month ago (2016-10-27 13:04:11 UTC) #35
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/2451713002/140001
4 years, 1 month ago (2016-10-27 13:33:40 UTC) #39
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/290945)
4 years, 1 month ago (2016-10-27 13:40:00 UTC) #41
yamaguchi
+mtomasz Will you review and approve the change to chrome/common/extensions/api/file_manager_private.idl ?
4 years, 1 month ago (2016-10-27 13:46:57 UTC) #43
mtomasz
lgtm. Sorry for late. Please always ping me if I don't respond in 24h.
4 years, 1 month ago (2016-11-01 06:16:07 UTC) #44
mtomasz
lgtm. Sorry for late. Please always ping me if I don't respond in 24h.
4 years, 1 month ago (2016-11-01 06:16:07 UTC) #45
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/2451713002/140001
4 years, 1 month ago (2016-11-02 05:48:42 UTC) #47
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 1 month ago (2016-11-02 06:47:25 UTC) #49
commit-bot: I haz the power
4 years, 1 month ago (2016-11-02 06:49:42 UTC) #51
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/dd19a48cddc73cdfea90e644ad05084aeb75ffb0
Cr-Commit-Position: refs/heads/master@{#429223}

Powered by Google App Engine
This is Rietveld 408576698