summaryrefslogtreecommitdiffstats
path: root/android_webview
diff options
context:
space:
mode:
authorclamy <clamy@chromium.org>2015-11-24 03:16:26 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-24 11:17:14 +0000
commit0d32d6d30fec43e2ad159193c65ace6636537b23 (patch)
tree5cda30ff5c6fac3d3494fafb6b39b237c5bb3ebd /android_webview
parent3e5bdb1f6e6644eb6da1864e66ecc2eab790e479 (diff)
downloadchromium_src-0d32d6d30fec43e2ad159193c65ace6636537b23.zip
chromium_src-0d32d6d30fec43e2ad159193c65ace6636537b23.tar.gz
chromium_src-0d32d6d30fec43e2ad159193c65ace6636537b23.tar.bz2
Add a WebContents getter callback in ResourceRequestInfo
This CL adds a method to ResourceRequestInfo that returns a callback that can be used on the UI thread to get the WebContents associated with the request.It is used in the SSLErrorHandler code, instead of using a RenderProcessHost ID and a RenderFrameHost ID directly .This allows SSL error interstitials to work with PlzNavigate enabled. BUG = 504347 Review URL: https://codereview.chromium.org/1459473003 Cr-Commit-Position: refs/heads/master@{#361314}
Diffstat (limited to 'android_webview')
-rw-r--r--android_webview/browser/aw_content_browser_client.cc5
-rw-r--r--android_webview/browser/aw_content_browser_client.h3
2 files changed, 3 insertions, 5 deletions
diff --git a/android_webview/browser/aw_content_browser_client.cc b/android_webview/browser/aw_content_browser_client.cc
index 2c24378..0b88116 100644
--- a/android_webview/browser/aw_content_browser_client.cc
+++ b/android_webview/browser/aw_content_browser_client.cc
@@ -356,8 +356,7 @@ AwContentBrowserClient::CreateQuotaPermissionContext() {
}
void AwContentBrowserClient::AllowCertificateError(
- int render_process_id,
- int render_frame_id,
+ content::WebContents* web_contents,
int cert_error,
const net::SSLInfo& ssl_info,
const GURL& request_url,
@@ -368,7 +367,7 @@ void AwContentBrowserClient::AllowCertificateError(
const base::Callback<void(bool)>& callback,
content::CertificateRequestResultType* result) {
AwContentsClientBridgeBase* client =
- AwContentsClientBridgeBase::FromID(render_process_id, render_frame_id);
+ AwContentsClientBridgeBase::FromWebContents(web_contents);
bool cancel_request = true;
if (client)
client->AllowCertificateError(cert_error,
diff --git a/android_webview/browser/aw_content_browser_client.h b/android_webview/browser/aw_content_browser_client.h
index a3a814e..960c3e8 100644
--- a/android_webview/browser/aw_content_browser_client.h
+++ b/android_webview/browser/aw_content_browser_client.h
@@ -91,8 +91,7 @@ class AwContentBrowserClient : public content::ContentBrowserClient {
const std::vector<std::pair<int, int>>& render_frames) override;
content::QuotaPermissionContext* CreateQuotaPermissionContext() override;
void AllowCertificateError(
- int render_process_id,
- int render_frame_id,
+ content::WebContents* web_contents,
int cert_error,
const net::SSLInfo& ssl_info,
const GURL& request_url,