Commit 7677f480 authored by Joe DeBlasio's avatar Joe DeBlasio Committed by Commit Bot

Final string update for Safety Tips for M79.

This CL updates the strings for Safety Tips for M79 after discussion
with UI. Only the lookalike strings changed. They now look like this:

Desktop: https://drive.google.com/file/d/1QMIPXkjRoQo65dnbzXbLuLiUbPM3Dexw/view?usp=sharing
Mobile: https://drive.google.com/file/d/1TOiO1QbkSoKwD2O02gslsATSd8tJ7UL0/view?usp=sharing

Bug: 1015659
Change-Id: Icfad11942b92f2532f8a789e2349adaab03c7a4c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1867380
Commit-Queue: Joe DeBlasio <jdeblasio@chromium.org>
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Auto-Submit: Joe DeBlasio <jdeblasio@chromium.org>
Reviewed-by: default avatarMustafa Emre Acer <meacer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#707184}
parent d85a48a0
...@@ -119,5 +119,5 @@ void SafetyTipInfoBarDelegate::InfoBarDismissed() { ...@@ -119,5 +119,5 @@ void SafetyTipInfoBarDelegate::InfoBarDismissed() {
} }
base::string16 SafetyTipInfoBarDelegate::GetDescriptionText() const { base::string16 SafetyTipInfoBarDelegate::GetDescriptionText() const {
return GetSafetyTipDescription(safety_tip_status_, suggested_url_); return GetSafetyTipDescription(safety_tip_status_, url_, suggested_url_);
} }
...@@ -52,7 +52,7 @@ void OpenHelpCenter(content::WebContents* web_contents) { ...@@ -52,7 +52,7 @@ void OpenHelpCenter(content::WebContents* web_contents) {
base::string16 GetSafetyTipTitle( base::string16 GetSafetyTipTitle(
security_state::SafetyTipStatus safety_tip_status, security_state::SafetyTipStatus safety_tip_status,
const GURL& url) { const GURL& suggested_url) {
switch (safety_tip_status) { switch (safety_tip_status) {
case security_state::SafetyTipStatus::kBadReputation: case security_state::SafetyTipStatus::kBadReputation:
return l10n_util::GetStringUTF16( return l10n_util::GetStringUTF16(
...@@ -64,7 +64,7 @@ base::string16 GetSafetyTipTitle( ...@@ -64,7 +64,7 @@ base::string16 GetSafetyTipTitle(
return l10n_util::GetStringFUTF16( return l10n_util::GetStringFUTF16(
IDS_PAGE_INFO_SAFETY_TIP_LOOKALIKE_TITLE, IDS_PAGE_INFO_SAFETY_TIP_LOOKALIKE_TITLE,
security_interstitials::common_string_util::GetFormattedHostName( security_interstitials::common_string_util::GetFormattedHostName(
url)); suggested_url));
#endif #endif
case security_state::SafetyTipStatus::kBadKeyword: case security_state::SafetyTipStatus::kBadKeyword:
case security_state::SafetyTipStatus::kUnknown: case security_state::SafetyTipStatus::kUnknown:
...@@ -78,16 +78,25 @@ base::string16 GetSafetyTipTitle( ...@@ -78,16 +78,25 @@ base::string16 GetSafetyTipTitle(
base::string16 GetSafetyTipDescription( base::string16 GetSafetyTipDescription(
security_state::SafetyTipStatus warning_type, security_state::SafetyTipStatus warning_type,
const GURL& url) { const GURL& url,
const GURL& suggested_url) {
switch (warning_type) { switch (warning_type) {
case security_state::SafetyTipStatus::kBadReputation: case security_state::SafetyTipStatus::kBadReputation:
return l10n_util::GetStringUTF16( return l10n_util::GetStringUTF16(
IDS_PAGE_INFO_SAFETY_TIP_BAD_REPUTATION_DESCRIPTION); IDS_PAGE_INFO_SAFETY_TIP_BAD_REPUTATION_DESCRIPTION);
case security_state::SafetyTipStatus::kLookalike: case security_state::SafetyTipStatus::kLookalike:
#if defined(OS_ANDROID)
return l10n_util::GetStringFUTF16(
IDS_SAFETY_TIP_ANDROID_LOOKALIKE_DESCRIPTION,
security_interstitials::common_string_util::GetFormattedHostName(url),
security_interstitials::common_string_util::GetFormattedHostName(
suggested_url));
#else
return l10n_util::GetStringFUTF16( return l10n_util::GetStringFUTF16(
IDS_PAGE_INFO_SAFETY_TIP_LOOKALIKE_DESCRIPTION, IDS_PAGE_INFO_SAFETY_TIP_LOOKALIKE_DESCRIPTION,
security_interstitials::common_string_util::GetFormattedHostName( security_interstitials::common_string_util::GetFormattedHostName(
url)); suggested_url));
#endif
case security_state::SafetyTipStatus::kBadKeyword: case security_state::SafetyTipStatus::kBadKeyword:
case security_state::SafetyTipStatus::kNone: case security_state::SafetyTipStatus::kNone:
case security_state::SafetyTipStatus::kUnknown: case security_state::SafetyTipStatus::kUnknown:
......
...@@ -34,13 +34,14 @@ void OpenHelpCenter(content::WebContents* web_contents); ...@@ -34,13 +34,14 @@ void OpenHelpCenter(content::WebContents* web_contents);
// Get the titles, descriptions, and button strings or IDs needed to describe // Get the titles, descriptions, and button strings or IDs needed to describe
// the applicable warning type. Handles both Android and desktop warnings. // the applicable warning type. Handles both Android and desktop warnings.
// |url| is the suggested URL to navigate to, and is used in formatting some // |url| is the URL of the current page. |suggested_url| is the suggested URL to
// strings. // navigate to. Both URLs are used in formatting some strings.
base::string16 GetSafetyTipTitle(security_state::SafetyTipStatus warning_type, base::string16 GetSafetyTipTitle(security_state::SafetyTipStatus warning_type,
const GURL& url); const GURL& suggested_url);
base::string16 GetSafetyTipDescription( base::string16 GetSafetyTipDescription(
security_state::SafetyTipStatus warning_type, security_state::SafetyTipStatus warning_type,
const GURL& url); const GURL& url,
const GURL& suggested_url);
int GetSafetyTipLeaveButtonId(security_state::SafetyTipStatus warning_type); int GetSafetyTipLeaveButtonId(security_state::SafetyTipStatus warning_type);
} // namespace safety_tips } // namespace safety_tips
......
...@@ -154,8 +154,9 @@ SafetyTipPageInfoBubbleView::SafetyTipPageInfoBubbleView( ...@@ -154,8 +154,9 @@ SafetyTipPageInfoBubbleView::SafetyTipPageInfoBubbleView(
layout_provider->GetDistanceMetric(DISTANCE_CONTROL_LIST_VERTICAL); layout_provider->GetDistanceMetric(DISTANCE_CONTROL_LIST_VERTICAL);
bottom_layout->StartRowWithPadding(views::GridLayout::kFixedSize, kColumnId, bottom_layout->StartRowWithPadding(views::GridLayout::kFixedSize, kColumnId,
views::GridLayout::kFixedSize, spacing); views::GridLayout::kFixedSize, spacing);
auto text_label = std::make_unique<views::Label>( auto text_label =
safety_tips::GetSafetyTipDescription(safety_tip_status, suggested_url_)); std::make_unique<views::Label>(safety_tips::GetSafetyTipDescription(
safety_tip_status, url_, suggested_url_));
text_label->SetMultiLine(true); text_label->SetMultiLine(true);
text_label->SetLineHeight(20); text_label->SetLineHeight(20);
text_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); text_label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
......
...@@ -51,8 +51,8 @@ ...@@ -51,8 +51,8 @@
<message name="IDS_PAGE_INFO_SAFETY_TIP_LOOKALIKE_TITLE" desc="Title of Safety Tip infobar on a domain that looks like another domain."> <message name="IDS_PAGE_INFO_SAFETY_TIP_LOOKALIKE_TITLE" desc="Title of Safety Tip infobar on a domain that looks like another domain.">
Did you mean <ph name='LOOKALIKE_DOMAIN'>$1<ex>google.com</ex></ph>? Did you mean <ph name='LOOKALIKE_DOMAIN'>$1<ex>google.com</ex></ph>?
</message> </message>
<message name="IDS_PAGE_INFO_SAFETY_TIP_LOOKALIKE_DESCRIPTION" desc="Body of an infobar warning when the user visits a page that triggered a Safety Tip because the domain looked like another domain."> <message name="IDS_PAGE_INFO_SAFETY_TIP_LOOKALIKE_DESCRIPTION" desc="Body of a warning when the user visits a page that triggered a Safety Tip because the domain looked like another domain.">
This site's name looks similar to <ph name='LOOKALIKE_DOMAIN'>$1<ex>google.com</ex></ph>. Attackers sometimes mimic sites by making small, hard-to-see changes to the domain name. This site's name looks similar to <ph name='LOOKALIKE_DOMAIN'>$1<ex>google.com</ex></ph>. Attackers sometimes mimic sites by making hard-to-see changes to the web address.
</message> </message>
<!-- Viewing file strings --> <!-- Viewing file strings -->
......
aa71f67fa4b2adea131a4862a5b639f7e12b69e0 7fa92a3f404032c58abeef97e056029d3db060d7
\ No newline at end of file \ No newline at end of file
...@@ -464,4 +464,7 @@ ...@@ -464,4 +464,7 @@
<message name="IDS_SAFETY_TIP_ANDROID_LOOKALIKE_TITLE" desc="Title of Safety Tip infobar on a domain that looks like another domain."> <message name="IDS_SAFETY_TIP_ANDROID_LOOKALIKE_TITLE" desc="Title of Safety Tip infobar on a domain that looks like another domain.">
Is this the right site? Is this the right site?
</message> </message>
<message name="IDS_SAFETY_TIP_ANDROID_LOOKALIKE_DESCRIPTION" desc="Body of an infobar warning when the user visits a page that triggered a Safety Tip because the domain looked like another domain.">
<ph name='LOOKALIKE_DOMAIN'>$1<ex>fake-google.com</ex></ph> looks similar to <ph name='SUGGESTED_DOMAIN'>$2<ex>google.com</ex></ph>. Attackers sometimes mimic sites by using similar URLs.
</message>
</grit-part> </grit-part>
d9d8988edc784098168f57a209bfd5b1b46f57b8
\ No newline at end of file
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