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

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

Issue 2419853002: [Autofill] Do not offer autofill suggestions on insecure forms (Closed)
Patch Set: Scheme check for HTTPS Created 4 years, 2 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/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 505a629410c19b43d4d1a5af59dbeeda915c7fd7..bd2b3ff39ab4b0f03d331864ee22dd0cdc109417 100644
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -552,7 +552,8 @@ void AutofillManager::OnQueryFormFieldAutofill(int query_id,
}
if (!suggestions.empty()) {
bool is_context_secure =
- client_->IsContextSecure(form_structure->source_url());
+ client_->IsContextSecure(form_structure->source_url()) &&
+ form_structure->target_url().SchemeIs("https");
if (is_filling_credit_card)
AutofillMetrics::LogIsQueriedCreditCardFormSecure(is_context_secure);

Powered by Google App Engine
This is Rietveld 408576698