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

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: wasting time... Created 7 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
« no previous file with comments | « android_webview/android_webview.gyp ('k') | android_webview/browser/aw_contents_client_bridge_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5ffcd983421537e00a0a3df1f92586d708aa0667..3d8185ed6e286cacc768f3064958ca3cb0085894 100644
--- a/android_webview/browser/aw_content_browser_client.cc
+++ b/android_webview/browser/aw_content_browser_client.cc
@@ -6,6 +6,7 @@
#include "android_webview/browser/aw_browser_context.h"
#include "android_webview/browser/aw_browser_main_parts.h"
+#include "android_webview/browser/aw_contents_client_bridge_base.h"
#include "android_webview/browser/aw_cookie_access_policy.h"
#include "android_webview/browser/aw_quota_permission_context.h"
#include "android_webview/browser/jni_dependency_factory.h"
@@ -22,6 +23,7 @@
#include "content/public/common/url_constants.h"
#include "grit/ui_resources.h"
#include "net/android/network_library.h"
+#include "net/base/ssl_info.h"
#include "ui/base/resource/resource_bundle.h"
namespace {
@@ -273,9 +275,15 @@ 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;
+
+ AwContentsClientBridgeBase* client =
+ AwContentsClientBridgeBase::FromID(render_process_id, render_view_id);
+ if (client) {
+ client->AllowCertificateError(cert_error, ssl_info.cert, request_url,
+ callback, cancel_request);
+ } else {
+ *cancel_request = true;
+ }
}
WebKit::WebNotificationPresenter::Permission
« no previous file with comments | « android_webview/android_webview.gyp ('k') | android_webview/browser/aw_contents_client_bridge_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698