| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "android_webview/native/aw_autofill_client.h" | 5 #include "android_webview/native/aw_autofill_client.h" |
| 6 | 6 |
| 7 #include "android_webview/browser/aw_browser_context.h" | 7 #include "android_webview/browser/aw_browser_context.h" |
| 8 #include "android_webview/browser/aw_content_browser_client.h" | 8 #include "android_webview/browser/aw_content_browser_client.h" |
| 9 #include "android_webview/browser/aw_form_database_service.h" | 9 #include "android_webview/browser/aw_form_database_service.h" |
| 10 #include "android_webview/native/aw_contents.h" | 10 #include "android_webview/native/aw_contents.h" |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 const std::vector<autofill::FormStructure*>& forms) {} | 178 const std::vector<autofill::FormStructure*>& forms) {} |
| 179 | 179 |
| 180 void AwAutofillClient::DidFillOrPreviewField( | 180 void AwAutofillClient::DidFillOrPreviewField( |
| 181 const base::string16& autofilled_value, | 181 const base::string16& autofilled_value, |
| 182 const base::string16& profile_full_name) {} | 182 const base::string16& profile_full_name) {} |
| 183 | 183 |
| 184 void AwAutofillClient::OnFirstUserGestureObserved() { | 184 void AwAutofillClient::OnFirstUserGestureObserved() { |
| 185 NOTIMPLEMENTED(); | 185 NOTIMPLEMENTED(); |
| 186 } | 186 } |
| 187 | 187 |
| 188 bool AwAutofillClient::IsContextSecure(const GURL& form_origin) { | 188 bool AwAutofillClient::IsContextSecure() { |
| 189 content::SSLStatus ssl_status; | 189 content::SSLStatus ssl_status; |
| 190 content::NavigationEntry* navigation_entry = | 190 content::NavigationEntry* navigation_entry = |
| 191 web_contents_->GetController().GetLastCommittedEntry(); | 191 web_contents_->GetController().GetLastCommittedEntry(); |
| 192 if (!navigation_entry) | 192 if (!navigation_entry) |
| 193 return false; | 193 return false; |
| 194 | 194 |
| 195 ssl_status = navigation_entry->GetSSL(); | 195 ssl_status = navigation_entry->GetSSL(); |
| 196 // Note: The implementation below is a copy of the one in | 196 // Note: The implementation below is a copy of the one in |
| 197 // ChromeAutofillClient::IsContextSecure, and should be kept in sync | 197 // ChromeAutofillClient::IsContextSecure, and should be kept in sync |
| 198 // until crbug.com/505388 gets implemented. | 198 // until crbug.com/505388 gets implemented. |
| 199 return navigation_entry->GetURL().SchemeIsCryptographic() && | 199 return navigation_entry->GetURL().SchemeIsCryptographic() && |
| 200 ssl_status.certificate && | 200 ssl_status.certificate && |
| 201 (!net::IsCertStatusError(ssl_status.cert_status) || | 201 (!net::IsCertStatusError(ssl_status.cert_status) || |
| 202 net::IsCertStatusMinorError(ssl_status.cert_status)) && | 202 net::IsCertStatusMinorError(ssl_status.cert_status)) && |
| 203 !(ssl_status.content_status & | 203 !(ssl_status.content_status & |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 | 272 |
| 273 void AwAutofillClient::ScanCreditCard(const CreditCardScanCallback& callback) { | 273 void AwAutofillClient::ScanCreditCard(const CreditCardScanCallback& callback) { |
| 274 NOTIMPLEMENTED(); | 274 NOTIMPLEMENTED(); |
| 275 } | 275 } |
| 276 | 276 |
| 277 bool RegisterAwAutofillClient(JNIEnv* env) { | 277 bool RegisterAwAutofillClient(JNIEnv* env) { |
| 278 return RegisterNativesImpl(env); | 278 return RegisterNativesImpl(env); |
| 279 } | 279 } |
| 280 | 280 |
| 281 } // namespace android_webview | 281 } // namespace android_webview |
| OLD | NEW |