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

Unified Diff: android_webview/native/aw_autofill_client.cc

Issue 2672623005: Record Autofill form events specially for nonsecure pages (Closed)
Patch Set: sebsg comments Created 3 years, 10 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: android_webview/native/aw_autofill_client.cc
diff --git a/android_webview/native/aw_autofill_client.cc b/android_webview/native/aw_autofill_client.cc
index 11079829ab95b4ae58ec8bcec4c02098c2e6430d..ec4b59298818a7887c6675d25ca38f80259a70a6 100644
--- a/android_webview/native/aw_autofill_client.cc
+++ b/android_webview/native/aw_autofill_client.cc
@@ -186,15 +186,19 @@ void AwAutofillClient::OnFirstUserGestureObserved() {
}
bool AwAutofillClient::IsContextSecure(const GURL& form_origin) {
+ return IsMainUrlSecure();
+}
+
+bool AwAutofillClient::IsMainUrlSecure() {
content::SSLStatus ssl_status;
content::NavigationEntry* navigation_entry =
web_contents_->GetController().GetLastCommittedEntry();
if (!navigation_entry)
- return false;
+ return false;
ssl_status = navigation_entry->GetSSL();
// Note: The implementation below is a copy of the one in
- // ChromeAutofillClient::IsContextSecure, and should be kept in sync
+ // ChromeAutofillClient::IsMainUrlSecure, and should be kept in sync
// until crbug.com/505388 gets implemented.
return navigation_entry->GetURL().SchemeIsCryptographic() &&
ssl_status.certificate &&

Powered by Google App Engine
This is Rietveld 408576698