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 22072d841c50fd3c71b0133067e85452624f27d8..6896ed6017b93dc4bfb4e9388625db8ddb731bfb 100644 |
--- a/components/autofill/core/browser/autofill_manager.cc |
+++ b/components/autofill/core/browser/autofill_manager.cc |
@@ -556,7 +556,8 @@ void AutofillManager::OnQueryFormFieldAutofill(int query_id, |
if (!suggestions.empty()) { |
bool is_context_secure = |
client_->IsContextSecure(form_structure->source_url()) && |
- form_structure->target_url().SchemeIs("https"); |
+ (!form_structure->target_url().is_valid() || |
+ !form_structure->target_url().SchemeIs("http")); |
if (is_filling_credit_card) |
AutofillMetrics::LogIsQueriedCreditCardFormSecure(is_context_secure); |