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 d64eca98160b3547488c0c832da922fba7f6af98..5344e9928cc5acf1f9d84f5cc45d55870bd4fb0a 100644 |
| --- a/components/autofill/core/browser/autofill_manager.cc |
| +++ b/components/autofill/core/browser/autofill_manager.cc |
| @@ -61,6 +61,7 @@ |
| #include "components/pref_registry/pref_registry_syncable.h" |
| #include "components/prefs/pref_service.h" |
| #include "components/rappor/rappor_utils.h" |
| +#include "components/security_state/switches.h" |
| #include "google_apis/gaia/identity_provider.h" |
| #include "grit/components_strings.h" |
| #include "ui/base/l10n/l10n_util.h" |
| @@ -569,6 +570,20 @@ void AutofillManager::OnQueryFormFieldAutofill(int query_id, |
| IDS_AUTOFILL_WARNING_INSECURE_CONNECTION)); |
| warning_suggestion.frontend_id = POPUP_ITEM_ID_WARNING_MESSAGE; |
| suggestions.assign(1, warning_suggestion); |
| + |
| + std::string choice = |
| + base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| + security_state::switches::kMarkHttpAs); |
| + if (choice == |
| + security_state::switches::kMarkHttpWithPasswordsOrCcWithChip) { |
|
estark
2016/11/07 06:06:57
Drive-by: this should be the new switch, right? (k
lshang
2016/11/07 06:12:12
Done. Yeah I've rebased and changed to use the new
|
| + autofill::Suggestion cc_field_http_warning_suggestion( |
| + l10n_util::GetStringUTF16( |
| + IDS_AUTOFILL_CREDIT_CARD_HTTP_WARNING_MESSAGE)); |
| + cc_field_http_warning_suggestion.frontend_id = |
| + autofill::POPUP_ITEM_ID_WARNING_MESSAGE; |
| + suggestions.insert(suggestions.begin(), |
| + cc_field_http_warning_suggestion); |
| + } |
| } else { |
| bool section_is_autofilled = |
| SectionIsAutofilled(*form_structure, form, |