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

Unified Diff: android_webview/browser/aw_content_browser_client.cc

Issue 12091111: Implement Webviewclient.onReceivedSslError (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor fix Created 7 years, 11 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/browser/aw_content_browser_client.cc
diff --git a/android_webview/browser/aw_content_browser_client.cc b/android_webview/browser/aw_content_browser_client.cc
index 5a53dd1cb0f381f96c5b860ad44640bf7912af37..081b072d03ef79788b99bcae5f69d0aa52bf3682 100644
--- a/android_webview/browser/aw_content_browser_client.cc
+++ b/android_webview/browser/aw_content_browser_client.cc
@@ -5,6 +5,7 @@
#include "android_webview/browser/aw_content_browser_client.h"
#include "android_webview/browser/aw_browser_main_parts.h"
+#include "android_webview/browser/aw_certificate_error_handler_base.h"
#include "android_webview/browser/aw_cookie_access_policy.h"
#include "android_webview/browser/aw_quota_permission_context.h"
#include "android_webview/browser/net_disk_cache_remover.h"
@@ -19,6 +20,7 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/common/url_constants.h"
#include "grit/ui_resources.h"
+#include "net/base/ssl_info.h"
#include "ui/base/resource/resource_bundle.h"
namespace {
@@ -206,9 +208,11 @@ void AwContentBrowserClient::AllowCertificateError(
bool strict_enforcement,
const base::Callback<void(bool)>& callback,
bool* cancel_request) {
- // TODO(boliu): Implement this to power WebViewClient.onReceivedSslError.
- NOTIMPLEMENTED();
- *cancel_request = true;
+
+ AwCertificateErrorHandlerBase* error_handler =
+ AwCertificateErrorHandlerBase::FromID(render_process_id, render_view_id);
+ error_handler->AllowCertificateError(cert_error, ssl_info.cert, request_url,
+ callback, cancel_request);
}
WebKit::WebNotificationPresenter::Permission

Powered by Google App Engine
This is Rietveld 408576698