Commit 0cb84fff authored by Jialiu Lin's avatar Jialiu Lin Committed by Commit Bot

Add default enterprise warning text in case org_name is not set

In case enterprise admin forgets to set the enterprise name, Chrome
will show generic warning text without specific enterprise name.

String doc:
https://docs.google.com/document/d/1A4vVFzhdW3HKyE2uFQIPBy12cpYBxdaW3_rbh9vZxyM

Bug: 824500, 824502
Change-Id: I0917c7ca90d63a2a8746bffd2c4beeeab4f61106
Reviewed-on: https://chromium-review.googlesource.com/1008737
Commit-Queue: Jialiu Lin <jialiul@chromium.org>
Reviewed-by: default avatarMustafa Emre Acer <meacer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550029}
parent b8323b99
......@@ -921,23 +921,20 @@ bool ChromePasswordProtectionService::IsURLWhitelistedForPasswordEntry(
base::string16 ChromePasswordProtectionService::GetWarningDetailText() {
if (!base::FeatureList::IsEnabled(
safe_browsing::kEnterprisePasswordProtectionV1)) {
return l10n_util::GetStringUTF16(IDS_PAGE_INFO_CHANGE_PASSWORD_DETAILS);
}
std::string enterprise_name =
profile_->GetPrefs()->GetString(prefs::kPasswordProtectionEnterpriseName);
if (enterprise_name.empty() ||
safe_browsing::kEnterprisePasswordProtectionV1) ||
GetSyncAccountType() != safe_browsing::LoginReputationClientRequest::
PasswordReuseEvent::GSUITE) {
return l10n_util::GetStringUTF16(IDS_PAGE_INFO_CHANGE_PASSWORD_DETAILS);
}
// For GSuite password reuses, we need to include their organization name in
// the site identity detail text.
return l10n_util::GetStringFUTF16(
IDS_PAGE_INFO_CHANGE_PASSWORD_DETAILS_ENTERPRISE,
base::UTF8ToUTF16(enterprise_name));
std::string enterprise_name =
profile_->GetPrefs()->GetString(prefs::kPasswordProtectionEnterpriseName);
return enterprise_name.empty()
? l10n_util::GetStringUTF16(
IDS_PAGE_INFO_CHANGE_PASSWORD_DETAILS_ENTERPRISE)
: l10n_util::GetStringFUTF16(
IDS_PAGE_INFO_CHANGE_PASSWORD_DETAILS_ENTERPRISE_WITH_ORG_NAME,
base::UTF8ToUTF16(enterprise_name));
}
} // namespace safe_browsing
......@@ -375,6 +375,9 @@
You could lose access to your Google Account or experience identity theft. Chrome recommends changing your password now.
</message>
<message name="IDS_PAGE_INFO_CHANGE_PASSWORD_DETAILS_ENTERPRISE" desc="A short paragraph explaining to the user that they have reused their password on the current website.">
You could lose access to your organization's account or experience identity theft. Chrome recommends changing your password now.
</message>
<message name="IDS_PAGE_INFO_CHANGE_PASSWORD_DETAILS_ENTERPRISE_WITH_ORG_NAME" desc="A short paragraph explaining to the user that they have reused their password on the current website.">
You could lose access to your <ph name="ORG_NAME">$1<ex>Google</ex></ph> account or experience identity theft. Chrome recommends changing your password now.
</message>
</if>
......@@ -383,6 +386,9 @@
You could lose access to your Google Account or experience identity theft. Chromium recommends changing your password now.
</message>
<message name="IDS_PAGE_INFO_CHANGE_PASSWORD_DETAILS_ENTERPRISE" desc="A short paragraph explaining to the user that they have reused their password on the current website.">
You could lose access to your organization's account or experience identity theft. Chromium recommends changing your password now.
</message>
<message name="IDS_PAGE_INFO_CHANGE_PASSWORD_DETAILS_ENTERPRISE_WITH_ORG_NAME" desc="A short paragraph explaining to the user that they have reused their password on the current website.">
You could lose access to your <ph name="ORG_NAME">$1<ex>Google</ex></ph> account or experience identity theft. Chromium recommends changing your password now.
</message>
</if>
......
dd80aead07076bd2d4aa3ff85ffb63c63a63d140
\ 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