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

Unified Diff: components/autofill/content/browser/content_autofill_driver.cc

Issue 2422363002: Trigger HTTP-bad warning when querying credit card autofill (Closed)
Patch Set: add missing blank line 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/content/browser/content_autofill_driver.cc
diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/components/autofill/content/browser/content_autofill_driver.cc
index 8332c650854dcd43918ef3a2526e9aaeda029f22..c0648785994745257b2b3963690397368dde6e8e 100644
--- a/components/autofill/content/browser/content_autofill_driver.cc
+++ b/components/autofill/content/browser/content_autofill_driver.cc
@@ -170,6 +170,15 @@ gfx::RectF ContentAutofillDriver::TransformBoundingBoxToViewportCoordinates(
return new_box;
}
+void ContentAutofillDriver::DidInteractWithCreditCardForm() {
+ // Notify the WebContents about credit card inputs on HTTP pages.
+ content::WebContents* contents =
+ content::WebContents::FromRenderFrameHost(render_frame_host_);
+ if (contents->GetVisibleURL().SchemeIsCryptographic())
+ return;
+ contents->OnCreditCardInputShownOnHttp();
+}
+
// mojom::AutofillDriver:
void ContentAutofillDriver::FirstUserGestureObserved() {
client_->OnFirstUserGestureObserved();

Powered by Google App Engine
This is Rietveld 408576698