Commit 2729de03 authored by Sergey Poromov's avatar Sergey Poromov Committed by Commit Bot

Update Deep Scanning download strings on Chrome OS.

Update the Chrome OS-only strings according to
https://docs.google.com/document/d/17ZQF59-5Quw542S9SlnCkFfp8a100ZU2Pn5NOZqyJrE/edit?usp=sharing

Include 3 changes:
1) Show filename instead of "Scan complete, no issues identified" for
the case of successful scans, so it looks like a normal download.
2) Change all the strings for notification while scanning, so it's:
Scanning <filename>       In progress
Checking with your organization's security policies.
https://drive.google.com/open?id=1S6J03NbR-3Uv6MDlRse5SwjmC-fi3rPT
3) Show reason for downloads blocked due to large size or being
encrypted.

Bug: 1081203
Bug: b/153456225
Change-Id: I3c7e59e3a0a7cae0ce2a105f3dfac422a2fc30a6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2230467Reviewed-by: default avatarMin Qin <qinmin@chromium.org>
Reviewed-by: default avatarDaniel Rubery <drubery@chromium.org>
Commit-Queue: Sergey Poromov <poromov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#776619}
parent 84c360e5
...@@ -1607,6 +1607,10 @@ are declared in tools/grit/grit_rule.gni. ...@@ -1607,6 +1607,10 @@ are declared in tools/grit/grit_rule.gni.
desc="The title of a download notification for offline pages not stored in Downloads."> desc="The title of a download notification for offline pages not stored in Downloads.">
Page is ready to view Page is ready to view
</message> </message>
<message name="IDS_DOWNLOAD_STATUS_SCAN_TITLE"
desc="The title of a download notification: the current download is being scanned.">
Scanning <ph name="FILE_NAME">$1<ex>somedocument.pdf</ex></ph>
</message>
<message name="IDS_DOWNLOAD_NOTIFICATION_STATUS_COMPLETED" <message name="IDS_DOWNLOAD_NOTIFICATION_STATUS_COMPLETED"
desc="Size and units downloaded, and the origin domain."> desc="Size and units downloaded, and the origin domain.">
<ph name="DOWNLOAD_RECEIVED">$1<ex>154 MB</ex></ph> from <ph name="DOWNLOAD_DOMAIN">$2<ex>example.com</ex></ph> <ph name="DOWNLOAD_RECEIVED">$1<ex>154 MB</ex></ph> from <ph name="DOWNLOAD_DOMAIN">$2<ex>example.com</ex></ph>
...@@ -1653,9 +1657,6 @@ are declared in tools/grit/grit_rule.gni. ...@@ -1653,9 +1657,6 @@ are declared in tools/grit/grit_rule.gni.
<message name="IDS_DOWNLOAD_STATUS_INTERRUPTED" desc="Status text for a download item that was interrupted."> <message name="IDS_DOWNLOAD_STATUS_INTERRUPTED" desc="Status text for a download item that was interrupted.">
Failed - <ph name="INTERRUPT_REASON">$1<ex>Disk full</ex></ph> Failed - <ph name="INTERRUPT_REASON">$1<ex>Disk full</ex></ph>
</message> </message>
<message name="IDS_DOWNLOAD_STATUS_SCANNED" desc="Status text for a download item that being scanned.">
Being scanned
</message>
<message name="IDS_DOWNLOAD_UNCONFIRMED_PREFIX" desc="The prefix used in the unconfirmed download file."> <message name="IDS_DOWNLOAD_UNCONFIRMED_PREFIX" desc="The prefix used in the unconfirmed download file.">
Unconfirmed Unconfirmed
</message> </message>
...@@ -1691,6 +1692,10 @@ are declared in tools/grit/grit_rule.gni. ...@@ -1691,6 +1692,10 @@ are declared in tools/grit/grit_rule.gni.
desc="Message shown in the download shelf when a download is being scanned"> desc="Message shown in the download shelf when a download is being scanned">
Checking <ph name="FILE_NAME">$1<ex>bla.exe</ex></ph> with your organization's security policies... Checking <ph name="FILE_NAME">$1<ex>bla.exe</ex></ph> with your organization's security policies...
</message> </message>
<message name="IDS_PROMPT_DEEP_SCANNING_DOWNLOAD_SHORT"
desc="Message shown in the download shelf when a download is being scanned, without the file name">
Checking with your organization's security policies.
</message>
<message name="IDS_PROMPT_CONFIRM_MIXED_CONTENT_DOWNLOAD" <message name="IDS_PROMPT_CONFIRM_MIXED_CONTENT_DOWNLOAD"
desc="Message shown to the user to validate the download when the download content is a mixed-content download."> desc="Message shown to the user to validate the download when the download content is a mixed-content download.">
<ph name="FILE_NAME">$1<ex>bla.exe</ex></ph> can't be downloaded securely <ph name="FILE_NAME">$1<ex>bla.exe</ex></ph> can't be downloaded securely
......
...@@ -720,6 +720,11 @@ base::string16 DownloadItemNotification::GetTitle() const { ...@@ -720,6 +720,11 @@ base::string16 DownloadItemNotification::GetTitle() const {
base::string16 file_name = base::string16 file_name =
item_->GetFileNameToReportUser().LossyDisplayName(); item_->GetFileNameToReportUser().LossyDisplayName();
if (IsScanning()) {
return l10n_util::GetStringFUTF16(IDS_DOWNLOAD_STATUS_SCAN_TITLE,
file_name);
}
switch (item_->GetState()) { switch (item_->GetState()) {
case download::DownloadItem::IN_PROGRESS: case download::DownloadItem::IN_PROGRESS:
if (!item_->IsPaused()) { if (!item_->IsPaused()) {
...@@ -848,6 +853,14 @@ base::string16 DownloadItemNotification::GetWarningStatusString() const { ...@@ -848,6 +853,14 @@ base::string16 DownloadItemNotification::GetWarningStatusString() const {
return l10n_util::GetStringFUTF16(IDS_PROMPT_DOWNLOAD_CHANGES_SETTINGS, return l10n_util::GetStringFUTF16(IDS_PROMPT_DOWNLOAD_CHANGES_SETTINGS,
elided_filename); elided_filename);
} }
case download::DOWNLOAD_DANGER_TYPE_BLOCKED_TOO_LARGE: {
return l10n_util::GetStringFUTF16(IDS_PROMPT_DOWNLOAD_BLOCKED_TOO_LARGE,
elided_filename);
}
case download::DOWNLOAD_DANGER_TYPE_BLOCKED_PASSWORD_PROTECTED: {
return l10n_util::GetStringFUTF16(
IDS_PROMPT_DOWNLOAD_BLOCKED_PASSWORD_PROTECTED, elided_filename);
}
case download::DOWNLOAD_DANGER_TYPE_SENSITIVE_CONTENT_WARNING: { case download::DOWNLOAD_DANGER_TYPE_SENSITIVE_CONTENT_WARNING: {
return l10n_util::GetStringFUTF16( return l10n_util::GetStringFUTF16(
IDS_PROMPT_DOWNLOAD_SENSITIVE_CONTENT_WARNING, elided_filename); IDS_PROMPT_DOWNLOAD_SENSITIVE_CONTENT_WARNING, elided_filename);
...@@ -860,8 +873,6 @@ base::string16 DownloadItemNotification::GetWarningStatusString() const { ...@@ -860,8 +873,6 @@ base::string16 DownloadItemNotification::GetWarningStatusString() const {
case download::DOWNLOAD_DANGER_TYPE_PROMPT_FOR_SCANNING: case download::DOWNLOAD_DANGER_TYPE_PROMPT_FOR_SCANNING:
case download::DOWNLOAD_DANGER_TYPE_DEEP_SCANNED_SAFE: case download::DOWNLOAD_DANGER_TYPE_DEEP_SCANNED_SAFE:
case download::DOWNLOAD_DANGER_TYPE_DEEP_SCANNED_OPENED_DANGEROUS: case download::DOWNLOAD_DANGER_TYPE_DEEP_SCANNED_OPENED_DANGEROUS:
case download::DOWNLOAD_DANGER_TYPE_BLOCKED_TOO_LARGE:
case download::DOWNLOAD_DANGER_TYPE_BLOCKED_PASSWORD_PROTECTED:
case download::DOWNLOAD_DANGER_TYPE_ASYNC_SCANNING: case download::DOWNLOAD_DANGER_TYPE_ASYNC_SCANNING:
case download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS: case download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS:
case download::DOWNLOAD_DANGER_TYPE_MAYBE_DANGEROUS_CONTENT: case download::DOWNLOAD_DANGER_TYPE_MAYBE_DANGEROUS_CONTENT:
...@@ -880,9 +891,9 @@ base::string16 DownloadItemNotification::GetInProgressSubStatusString() const { ...@@ -880,9 +891,9 @@ base::string16 DownloadItemNotification::GetInProgressSubStatusString() const {
if (item_->IsPaused()) if (item_->IsPaused())
return l10n_util::GetStringUTF16(IDS_DOWNLOAD_PROGRESS_PAUSED); return l10n_util::GetStringUTF16(IDS_DOWNLOAD_PROGRESS_PAUSED);
// "Being scanned" // "In progress" (scanning)
if (IsScanning()) if (IsScanning())
return l10n_util::GetStringUTF16(IDS_DOWNLOAD_STATUS_SCANNED); return l10n_util::GetStringUTF16(IDS_DOWNLOAD_STATUS_IN_PROGRESS_SHORT);
base::TimeDelta time_remaining; base::TimeDelta time_remaining;
// time_remaining is only known if the download isn't paused. // time_remaining is only known if the download isn't paused.
...@@ -922,9 +933,6 @@ base::string16 DownloadItemNotification::GetSubStatusString() const { ...@@ -922,9 +933,6 @@ base::string16 DownloadItemNotification::GetSubStatusString() const {
return GetWarningStatusString(); return GetWarningStatusString();
if (item_->GetDangerType() == if (item_->GetDangerType() ==
download::DownloadDangerType::DOWNLOAD_DANGER_TYPE_DEEP_SCANNED_SAFE) {
return l10n_util::GetStringUTF16(IDS_PROMPT_DOWNLOAD_DEEP_SCANNED_SAFE);
} else if (item_->GetDangerType() ==
download::DownloadDangerType:: download::DownloadDangerType::
DOWNLOAD_DANGER_TYPE_DEEP_SCANNED_OPENED_DANGEROUS) { DOWNLOAD_DANGER_TYPE_DEEP_SCANNED_OPENED_DANGEROUS) {
return l10n_util::GetStringUTF16( return l10n_util::GetStringUTF16(
...@@ -978,6 +986,10 @@ base::string16 DownloadItemNotification::GetStatusString() const { ...@@ -978,6 +986,10 @@ base::string16 DownloadItemNotification::GetStatusString() const {
if (item_->IsDangerous() || item_->IsMixedContent()) if (item_->IsDangerous() || item_->IsMixedContent())
return base::string16(); return base::string16();
if (IsScanning()) {
return l10n_util::GetStringUTF16(IDS_PROMPT_DEEP_SCANNING_DOWNLOAD_SHORT);
}
// 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(
item_->GetURL(), url_formatter::SchemeDisplay::OMIT_HTTP_AND_HTTPS); item_->GetURL(), url_formatter::SchemeDisplay::OMIT_HTTP_AND_HTTPS);
......
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