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

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

Issue 2478043002: HTTP Bad: Add warning message to autofill dropdown for http sites (Closed)
Patch Set: remove an unused header file Created 4 years, 1 month 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 d64eca98160b3547488c0c832da922fba7f6af98..85c867a9308a88c0c83c105318183dcfaac73606 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 =
Mathieu 2016/11/07 14:32:27 Add a comment on both this block and the previous
lshang 2016/11/08 06:00:58 Done.
+ base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ security_state::switches::kMarkHttpAs);
+ if (choice == security_state::switches::
Mathieu 2016/11/07 14:32:27 Please put the whole check for the flags in autofi
lshang 2016/11/08 06:00:57 Done.
+ kMarkHttpWithPasswordsOrCcWithChipAndFormWarning) {
+ autofill::Suggestion cc_field_http_warning_suggestion(
Mathieu 2016/11/07 14:32:27 nit: remove autofill::
lshang 2016/11/08 06:00:58 Done. Also with the autofill::POPUP_ITEM_ID_WARNIN
+ 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,

Powered by Google App Engine
This is Rietveld 408576698