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

Unified Diff: components/password_manager/core/browser/password_autofill_manager.cc

Issue 2604453003: Show Form-Not-Secure warning on page load (Closed)
Patch Set: meacer, jochen comments Created 3 years, 12 months 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/password_manager/core/browser/password_autofill_manager.cc
diff --git a/components/password_manager/core/browser/password_autofill_manager.cc b/components/password_manager/core/browser/password_autofill_manager.cc
index a553ceaac2d3e51c83d5ab5d588c50763c12e956..25c1e06ab48865f078e29237d48c7613f6304772 100644
--- a/components/password_manager/core/browser/password_autofill_manager.cc
+++ b/components/password_manager/core/browser/password_autofill_manager.cc
@@ -241,6 +241,21 @@ void PasswordAutofillManager::OnShowPasswordSuggestions(
weak_ptr_factory_.GetWeakPtr());
}
+void PasswordAutofillManager::OnShowNotSecureWarning(
+ base::i18n::TextDirection text_direction,
+ const gfx::RectF& bounds) {
+ DCHECK(security_state::IsHttpWarningInFormEnabled());
+ std::vector<autofill::Suggestion> suggestions;
+ autofill::Suggestion http_warning_suggestion(
+ l10n_util::GetStringUTF8(IDS_AUTOFILL_LOGIN_HTTP_WARNING_MESSAGE),
+ l10n_util::GetStringUTF8(IDS_AUTOFILL_HTTP_WARNING_LEARN_MORE),
+ "httpWarning", autofill::POPUP_ITEM_ID_HTTP_NOT_SECURE_WARNING_MESSAGE);
+ suggestions.insert(suggestions.begin(), http_warning_suggestion);
+
+ autofill_client_->ShowAutofillPopup(bounds, text_direction, suggestions,
+ weak_ptr_factory_.GetWeakPtr());
+}
+
void PasswordAutofillManager::DidNavigateMainFrame() {
login_to_password_info_.clear();
}

Powered by Google App Engine
This is Rietveld 408576698