Chromium Code Reviews| 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..445abac47dcb5e14a8da0b4956dea2f2b20ea673 100644 |
| --- a/components/autofill/core/browser/autofill_manager.cc |
| +++ b/components/autofill/core/browser/autofill_manager.cc |
| @@ -583,17 +583,23 @@ 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; |
| + is_http_warning_enabled |
| + ? POPUP_ITEM_ID_PAYMENT_DISABLED_MESSAGE |
|
estark
2016/12/14 23:46:08
I'm not sure if introducing a new PopupItemId is t
Mathieu
2016/12/15 17:52:06
Replied over there. I think we should get rid of w
|
| + : 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; |