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

Unified Diff: content/browser/ssl/ssl_manager.cc

Issue 1459473003: Add a WebContents getter callback in ResourceRequestInfo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Nasko's comment Created 5 years, 1 month 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 | « content/browser/ssl/ssl_manager.h ('k') | content/browser/ssl/ssl_policy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/ssl/ssl_manager.cc
diff --git a/content/browser/ssl/ssl_manager.cc b/content/browser/ssl/ssl_manager.cc
index e4c71e3dc4e0f8b2c520afe4cb9d9979d51140d9..cd6c2bea1adf64137ac66455927c5f62a0551e2e 100644
--- a/content/browser/ssl/ssl_manager.cc
+++ b/content/browser/ssl/ssl_manager.cc
@@ -51,8 +51,7 @@ void SSLManager::OnSSLCertificateError(
const base::WeakPtr<SSLErrorHandler::Delegate>& delegate,
const ResourceType resource_type,
const GURL& url,
- int render_process_id,
- int render_frame_id,
+ const base::Callback<WebContents*(void)>& web_contents_getter,
const net::SSLInfo& ssl_info,
bool fatal) {
DCHECK(delegate.get());
@@ -60,8 +59,6 @@ void SSLManager::OnSSLCertificateError(
<< net::MapCertStatusToNetError(ssl_info.cert_status)
<< " resource_type: " << resource_type
<< " url: " << url.spec()
- << " render_process_id: " << render_process_id
- << " render_frame_id: " << render_frame_id
<< " cert_status: " << std::hex << ssl_info.cert_status;
// A certificate error occurred. Construct a SSLCertErrorHandler object and
@@ -69,13 +66,23 @@ void SSLManager::OnSSLCertificateError(
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
base::Bind(&SSLCertErrorHandler::Dispatch,
- new SSLCertErrorHandler(delegate,
- resource_type,
- url,
- render_process_id,
- render_frame_id,
- ssl_info,
- fatal)));
+ new SSLCertErrorHandler(delegate, resource_type, url, ssl_info,
+ fatal),
+ web_contents_getter));
+}
+
+// static
+void SSLManager::OnSSLCertificateSubresourceError(
+ const base::WeakPtr<SSLErrorHandler::Delegate>& delegate,
+ const GURL& url,
+ int render_process_id,
+ int render_frame_id,
+ const net::SSLInfo& ssl_info,
+ bool fatal) {
+ OnSSLCertificateError(delegate, RESOURCE_TYPE_SUB_RESOURCE, url,
+ base::Bind(&WebContentsImpl::FromRenderFrameHostID,
+ render_process_id, render_frame_id),
+ ssl_info, fatal);
}
// static
« no previous file with comments | « content/browser/ssl/ssl_manager.h ('k') | content/browser/ssl/ssl_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698