Commit 5296f14e authored by Daniel Rubery's avatar Daniel Rubery Committed by Commit Bot

Show WarningStatusString on ChromeOS for dangerous downloads

Currently, for dangerous downloads on ChromeOS, we show a notification
with an empty message, and the progress_status set to the
WarningStatusString. But for a blocked download, we don't show the
progress bar, so the WarningStatusString is ignored. This CL sets the
notification message to the WarningStatusString.

Previous behavior: https://screenshot.googleplex.com/GOtztKVUrJe.png
New behavior: https://screenshot.googleplex.com/hHu62tdx6vx.png



Bug: 973000, 807334
Change-Id: I48b060d57d1bc0ad26e5c02d0cdfce2b3664d9c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1663081Reviewed-by: default avatarShakti Sahu <shaktisahu@chromium.org>
Commit-Queue: Daniel Rubery <drubery@chromium.org>
Cr-Commit-Position: refs/heads/master@{#672199}
parent 93aa97a3
...@@ -773,7 +773,7 @@ base::string16 DownloadItemNotification::GetInProgressSubStatusString() const { ...@@ -773,7 +773,7 @@ base::string16 DownloadItemNotification::GetInProgressSubStatusString() const {
base::string16 DownloadItemNotification::GetSubStatusString() const { base::string16 DownloadItemNotification::GetSubStatusString() const {
if (item_->IsDangerous()) if (item_->IsDangerous())
return base::string16(); return GetWarningStatusString();
switch (item_->GetState()) { switch (item_->GetState()) {
case download::DownloadItem::IN_PROGRESS: case download::DownloadItem::IN_PROGRESS:
...@@ -816,7 +816,7 @@ base::string16 DownloadItemNotification::GetSubStatusString() const { ...@@ -816,7 +816,7 @@ base::string16 DownloadItemNotification::GetSubStatusString() const {
base::string16 DownloadItemNotification::GetStatusString() const { base::string16 DownloadItemNotification::GetStatusString() const {
if (item_->IsDangerous()) if (item_->IsDangerous())
return GetWarningStatusString(); return base::string16();
// The hostname. (E.g.:"example.com" or "127.0.0.1") // The hostname. (E.g.:"example.com" or "127.0.0.1")
base::string16 host_name = url_formatter::FormatUrlForSecurityDisplay( base::string16 host_name = url_formatter::FormatUrlForSecurityDisplay(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment