New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 636373 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Format operation available (but fails) for a write-protected device

Project Member Reported by yamaguchi@chromium.org, Aug 10 2016

Issue description

Chrome Version: 54.0.2826.0
Chrome OS Version: 8631.0.0

Steps To Reproduce:
(1) Open Files App.
(2) Insert a write-protected SD card.
(3) Right-click the SD card on the left pane.
It will not repro if you left-click the SD card before step 3.

Expected Result:
"Format device" menu item in the context menu is grayed out.

Actual Result:
"Format device" is active.
(If the user attempt to format the device, it will fail.)

How frequently does this problem reproduce?
Always

What is the impact to the user, and is there a workaround? If so, what is
it?
This is UI issue.
User can know that the formatting failed from the error message.
The menu appears correctly when user right-click it again.
 
Owner: yamaguchi@chromium.org
Status: Started (was: Untriaged)
Project Member

Comment 2 by bugdroid1@chromium.org, Aug 17 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bffc32eb63e5e211a1f2bd44cae8c91bc5ac2922

commit bffc32eb63e5e211a1f2bd44cae8c91bc5ac2922
Author: yamaguchi <yamaguchi@chromium.org>
Date: Wed Aug 17 06:35:39 2016

Prevent formatting a device being mounted in read-only mode.
The change adds a double check before starting unmount-for-format
operation to ensure that the read-only devices cannot be formatted even
when the UI issues that command.
It will also apply for devices mounted in read-only mode by the policy after
https://codereview.chromium.org/2230713003/ ,
in addition to HW write-protected device.

The UI issue ( crbug.com/636373 ) will also be fixed separately.

TEST=unittest and manual test utilizing the repro steps noted in  crbug.com/636373  to see formatting a writable device results in an error. The manual test requires to merge 2230713003 and 2248033003 locally.
BUG=629945, 636373 

Review-Url: https://codereview.chromium.org/2247263002
Cr-Commit-Position: refs/heads/master@{#412461}

[modify] https://crrev.com/bffc32eb63e5e211a1f2bd44cae8c91bc5ac2922/chromeos/disks/disk_mount_manager.cc
[modify] https://crrev.com/bffc32eb63e5e211a1f2bd44cae8c91bc5ac2922/chromeos/disks/disk_mount_manager_unittest.cc

Status: Fixed (was: Started)
https://codereview.chromium.org/2253873002/ should have fixed the UI issue.
Project Member

Comment 5 by bugdroid1@chromium.org, Aug 18 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cd72b4ad55b118790f0ed69847aa8f0a78e98004

commit cd72b4ad55b118790f0ed69847aa8f0a78e98004
Author: yamaguchi <yamaguchi@chromium.org>
Date: Thu Aug 18 03:57:57 2016

Fix the condition to allow format.
When a drive is right-clicked, the focus of fileManager is not set to the drive unless it has been left-clicked once before that.

test=manual test on device using a write-protected SD card and USB drive
BUG= 636373 

Review-Url: https://codereview.chromium.org/2253873002
Cr-Commit-Position: refs/heads/master@{#412731}

[modify] https://crrev.com/cd72b4ad55b118790f0ed69847aa8f0a78e98004/ui/file_manager/file_manager/foreground/js/file_manager_commands.js

Project Member

Comment 6 by bugdroid1@chromium.org, Aug 18 2016

Labels: merge-merged-2832
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cd72b4ad55b118790f0ed69847aa8f0a78e98004

commit cd72b4ad55b118790f0ed69847aa8f0a78e98004
Author: yamaguchi <yamaguchi@chromium.org>
Date: Thu Aug 18 03:57:57 2016

Fix the condition to allow format.
When a drive is right-clicked, the focus of fileManager is not set to the drive unless it has been left-clicked once before that.

test=manual test on device using a write-protected SD card and USB drive
BUG= 636373 

Review-Url: https://codereview.chromium.org/2253873002
Cr-Commit-Position: refs/heads/master@{#412731}

[modify] https://crrev.com/cd72b4ad55b118790f0ed69847aa8f0a78e98004/ui/file_manager/file_manager/foreground/js/file_manager_commands.js

Comment 7 by dchan@google.com, Aug 18 2016

Cc: dchan@chromium.org krishna...@chromium.org scunning...@chromium.org
Components: Enterprise
Labels: M-54
Cc: ka...@chromium.org sdantul...@chromium.org abod...@chromium.org rookrishna@chromium.org
After investigation, it turned out that the gray-out of the context menu item was done based on the previous focus. So we can reproduce it by these steps:
(1) Open Files App.
(2) Insert a write-protected SD card, and a USB flash drive (not write-protected).
(3) Left-click the SD card on the left pane.
(4) Right-click the USB drive on the left pane.
(5) See "Format device" item in the context menu.
   expected: enabled
   actual: grayed out
(6) Left-click the USB drive on the left pane.
(7) Right-click the SD card on the left pane.
(8) See "Format device" item in the context menu.
   expected: grayed out
   actual: enabled

The repro steps in the first report is equivalent to (6)--(8) above.
Status: Verified (was: Fixed)
Verified:
M	ChromeOS	Chrome	ARC	Type	Channel
54	8743.28.0	54.0.2840.25	3268846	release	dev
Device: Peppy MP

Steps:  on a enterprise enrolled account
1. inserted a write-protected SD card on to SD port.
2. Right clicked on mounted SD card.

Results:
"Format device" is greyed out and is not selectable.

Sign in to add a comment