Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Unified Diff: components/autofill/core/browser/autofill_manager.cc

Issue 2576143002: Tweak payment autofill disabled message in form-not-secure (Closed)
Patch Set: Remove new PopupItemId and remove warning_font_list_ Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/autofill/core/browser/autofill_manager.cc
diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc
index fe2557cbffdd9799d863cce347428cfeccce94e3..7637991a1e28b1e49c7812bb0177e6d3ded4ef9b 100644
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -583,17 +583,21 @@ void AutofillManager::OnQueryFormFieldAutofill(int query_id,
// provide them for secure pages with passive mixed content (see impl. of
// IsContextSecure).
if (is_filling_credit_card && !is_context_secure) {
+ bool is_http_warning_enabled = IsCreditCardAutofillHttpWarningEnabled();
// Replace the suggestion content with a warning message explaining why
- // Autofill is disabled for a website.
+ // Autofill is disabled for a website. The string is different if the
+ // credit card autofill HTTP warning experiment is enabled.
Suggestion warning_suggestion(l10n_util::GetStringUTF16(
- IDS_AUTOFILL_WARNING_INSECURE_CONNECTION));
+ is_http_warning_enabled
+ ? IDS_AUTOFILL_WARNING_PAYMENT_DISABLED
+ : IDS_AUTOFILL_WARNING_INSECURE_CONNECTION));
warning_suggestion.frontend_id =
POPUP_ITEM_ID_INSECURE_CONTEXT_PAYMENT_DISABLED_MESSAGE;
suggestions.assign(1, warning_suggestion);
// On top of the explanation message, first show a "Payment not secure"
// message.
- if (IsCreditCardAutofillHttpWarningEnabled()) {
+ if (is_http_warning_enabled) {
#if !defined(OS_ANDROID)
suggestions.insert(suggestions.begin(), Suggestion());
suggestions.front().frontend_id = POPUP_ITEM_ID_SEPARATOR;

Powered by Google App Engine
This is Rietveld 408576698