Description[Mac] Update the warnings UI for malicious downloads.
When SafeBrowsing detects that a download is malicious, the user is only
presented with a 'Dismiss' option. Additional options ('Learn more' and
optionally 'Report', if applicable) are available from a context menu.
This behavior has been available on the Windows build. This change
brings the Mac UI up to parity.
XIB Changes (DownloadItem.xib):
* Add new controls for malicious downloads:
* New GTMWidthBasedTweaker for managing the size of 'Dismiss' button
connected to maliciousButtonTweaker: IBOutlet.
* New 'Dismiss' push button connected to dismissMaliciousDownload:
IBAction.
* New disclosure button connected to showContextMenu: IBAction.
* Change connection for GTMWidthBasedTweaker containing 'Discard' button
to dangerousButtonTweaker: IBOutlet.
* Anchor WidthBasedTweakers on the left instead of the right since the
code assumes that the tweakers don't shift horizontally when the
embedded buttons change size.
* Change height of Insecure Download NSBox to match the height of the
DownloadItemButton.
* Adjust position of buttons for both dangerous and malicious downloads
so that they are centered in the download shelf.
BUG=235931
TEST=(1) Download something from a URL that is identified by SafeBrowsing
as malicious.
(2) Check that the download shelf displays a warning indicating that
the download was malicious and that it was blocked. There should
only be a "Dismiss" button and a disclosure button.
(3) Click on the disclosure button. It should display a menu with a
'Learn more' item. Clicking on that item should open the
SafeBrowsing help center article.
(4) Click on the 'Dismiss' button. The warning should go away. If it
was the only download, the shelf should also disappear.
(5) Open chrome://downloads. The download should still be here with
a 'Recover' option and a 'Remove' option.
Original Review URL: https://codereview.chromium.org/40733005/
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=232945
Patch Set 1 #
Messages
Total messages: 9 (0 generated)
|