Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser/aw_content_browser_client.h" | 5 #include "android_webview/browser/aw_content_browser_client.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "android_webview/browser/aw_browser_context.h" | 9 #include "android_webview/browser/aw_browser_context.h" |
| 10 #include "android_webview/browser/aw_browser_main_parts.h" | 10 #include "android_webview/browser/aw_browser_main_parts.h" |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 387 callback) { | 387 callback) { |
| 388 AwContentsClientBridgeBase* client = | 388 AwContentsClientBridgeBase* client = |
| 389 AwContentsClientBridgeBase::FromWebContents(web_contents); | 389 AwContentsClientBridgeBase::FromWebContents(web_contents); |
| 390 bool cancel_request = true; | 390 bool cancel_request = true; |
| 391 if (client) | 391 if (client) |
| 392 client->AllowCertificateError(cert_error, | 392 client->AllowCertificateError(cert_error, |
| 393 ssl_info.cert.get(), | 393 ssl_info.cert.get(), |
| 394 request_url, | 394 request_url, |
| 395 callback, | 395 callback, |
| 396 &cancel_request); | 396 &cancel_request); |
| 397 // TODO bail here on JNI exception ? Will we want to run the callback first? | |
|
sgurun-gerrit only
2017/05/09 20:29:59
No you don't need to run.
gsennton
2017/05/11 12:17:16
Actually, I think we should explicitly avoid calli
| |
| 397 if (cancel_request) | 398 if (cancel_request) |
| 398 callback.Run(content::CERTIFICATE_REQUEST_RESULT_TYPE_DENY); | 399 callback.Run(content::CERTIFICATE_REQUEST_RESULT_TYPE_DENY); |
| 399 } | 400 } |
| 400 | 401 |
| 401 void AwContentBrowserClient::SelectClientCertificate( | 402 void AwContentBrowserClient::SelectClientCertificate( |
| 402 content::WebContents* web_contents, | 403 content::WebContents* web_contents, |
| 403 net::SSLCertRequestInfo* cert_request_info, | 404 net::SSLCertRequestInfo* cert_request_info, |
| 404 net::CertificateList client_certs, | 405 net::CertificateList client_certs, |
| 405 std::unique_ptr<content::ClientCertificateDelegate> delegate) { | 406 std::unique_ptr<content::ClientCertificateDelegate> delegate) { |
| 406 AwContentsClientBridgeBase* client = | 407 AwContentsClientBridgeBase* client = |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 565 render_frame_host)); | 566 render_frame_host)); |
| 566 | 567 |
| 567 // Although WebView does not support password manager feature, renderer code | 568 // Although WebView does not support password manager feature, renderer code |
| 568 // could still request this interface, so we register a dummy binder which | 569 // could still request this interface, so we register a dummy binder which |
| 569 // just drops the incoming request, to avoid the 'Failed to locate a binder | 570 // just drops the incoming request, to avoid the 'Failed to locate a binder |
| 570 // for interface' error log.. | 571 // for interface' error log.. |
| 571 registry->AddInterface(base::Bind(&DummyBindPasswordManagerDriver)); | 572 registry->AddInterface(base::Bind(&DummyBindPasswordManagerDriver)); |
| 572 } | 573 } |
| 573 | 574 |
| 574 } // namespace android_webview | 575 } // namespace android_webview |
| OLD | NEW |