| Index: content/browser/renderer_host/resource_dispatcher_host.cc
|
| diff --git a/content/browser/renderer_host/resource_dispatcher_host.cc b/content/browser/renderer_host/resource_dispatcher_host.cc
|
| index 3000f502c579d1df846ba96d1fe688e5f2325861..afeb9c6cf868c894a5d2ba809f9f9f34ca8697a5 100644
|
| --- a/content/browser/renderer_host/resource_dispatcher_host.cc
|
| +++ b/content/browser/renderer_host/resource_dispatcher_host.cc
|
| @@ -389,6 +389,62 @@ ResourceDispatcherHost::CreateResourceHandlerForDownload(
|
| return handler;
|
| }
|
|
|
| +ResourceType::Type ResourceDispatcherHost::ResourceTypeForSSLRequest(
|
| + const GlobalRequestID& id) {
|
| + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
|
| + net::URLRequest* request = GetURLRequest(id);
|
| + DCHECK(request);
|
| + ResourceDispatcherHostRequestInfo* info = InfoForRequest(request);
|
| + DCHECK(info);
|
| + return info->resource_type();
|
| +}
|
| +
|
| +const GURL& ResourceDispatcherHost::URLForSSLRequest(
|
| + const GlobalRequestID& id) {
|
| + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
|
| + net::URLRequest* request = GetURLRequest(id);
|
| + DCHECK(request);
|
| + return request->url();
|
| +}
|
| +
|
| +bool ResourceDispatcherHost::RenderViewForSSLRequest(
|
| + const GlobalRequestID& id,
|
| + int* render_process_host_id,
|
| + int* render_view_host_id) {
|
| + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
|
| + return RenderViewForRequest(
|
| + GetURLRequest(id), render_process_host_id, render_view_host_id);
|
| +}
|
| +
|
| +void ResourceDispatcherHost::CancelSSLRequest(
|
| + const GlobalRequestID& id,
|
| + int error,
|
| + const net::SSLInfo* ssl_info) {
|
| + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
|
| + net::URLRequest* request = GetURLRequest(id);
|
| + // The request can be NULL if it was cancelled by the renderer (as the
|
| + // request of the user navigating to a new page from the location bar).
|
| + if (!request)
|
| + return;
|
| + DVLOG(1) << "CancelRequestForInstance() url: " << request->url().spec();
|
| + if (ssl_info)
|
| + request->SimulateSSLError(error, *ssl_info);
|
| + else
|
| + request->SimulateError(error);
|
| +}
|
| +
|
| +void ResourceDispatcherHost::ContinueSSLRequest(
|
| + const GlobalRequestID& id) {
|
| + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
|
| + net::URLRequest* request = GetURLRequest(id);
|
| + // The request can be NULL if it was cancelled by the renderer (as the
|
| + // request of the user navigating to a new page from the location bar).
|
| + if (!request)
|
| + return;
|
| + DVLOG(1) << "ContinueRequestForInstance() url: " << request->url().spec();
|
| + request->ContinueDespiteLastError();
|
| +}
|
| +
|
| void ResourceDispatcherHost::SetRequestInfo(
|
| net::URLRequest* request,
|
| ResourceDispatcherHostRequestInfo* info) {
|
| @@ -1429,7 +1485,10 @@ void ResourceDispatcherHost::OnSSLCertificateError(
|
| const net::SSLInfo& ssl_info,
|
| bool is_hsts_host) {
|
| DCHECK(request);
|
| - SSLManager::OnSSLCertificateError(this, request, ssl_info, is_hsts_host);
|
| + ResourceDispatcherHostRequestInfo* info = InfoForRequest(request);
|
| + DCHECK(info);
|
| + GlobalRequestID request_id(info->child_id(), info->request_id());
|
| + SSLManager::OnSSLCertificateError(this, request_id, ssl_info, is_hsts_host);
|
| }
|
|
|
| bool ResourceDispatcherHost::CanGetCookies(
|
|
|