Index: content/browser/loader/resource_loader.cc |
diff --git a/content/browser/loader/resource_loader.cc b/content/browser/loader/resource_loader.cc |
index a9d88780994cf660e1af5205e558eb5bba1e5600..0bbb3b77cfefaaef443864ade136bd4ef1b70f36 100644 |
--- a/content/browser/loader/resource_loader.cc |
+++ b/content/browser/loader/resource_loader.cc |
@@ -26,7 +26,6 @@ |
#include "content/browser/ssl/ssl_manager.h" |
#include "content/browser/ssl/ssl_policy.h" |
#include "content/common/security_style_util.h" |
-#include "content/public/browser/cert_store.h" |
#include "content/public/browser/resource_dispatcher_host_login_delegate.h" |
#include "content/public/common/content_client.h" |
#include "content/public/common/content_switches.h" |
@@ -55,7 +54,6 @@ namespace { |
void PopulateResourceResponse(ResourceRequestInfoImpl* info, |
net::URLRequest* request, |
- CertStore* cert_store, |
ResourceResponse* response) { |
response->head.request_time = request->request_time(); |
response->head.response_time = request->response_time(); |
@@ -105,8 +103,7 @@ void PopulateResourceResponse(ResourceRequestInfoImpl* info, |
// TODO(jam): keep this call temporarily since it's what adds the |
// certificate to the CertStore. |
ResourceLoader::GetSSLStatusForRequest( |
- request->url(), request->ssl_info(), info->GetChildID(), |
- cert_store, &ssl_status); |
+ request->url(), request->ssl_info(), info->GetChildID(), &ssl_status); |
response->head.has_major_certificate_errors = |
net::IsCertStatusError(request->ssl_info().cert_status) && |
!net::IsCertStatusMinorError(request->ssl_info().cert_status); |
@@ -145,19 +142,15 @@ void PopulateResourceResponse(ResourceRequestInfoImpl* info, |
void ResourceLoader::GetSSLStatusForRequest(const GURL& url, |
const net::SSLInfo& ssl_info, |
int child_id, |
- CertStore* cert_store, |
SSLStatus* ssl_status) { |
DCHECK(ssl_info.cert); |
- int cert_id = cert_store->StoreCert(ssl_info.cert.get(), child_id); |
- |
*ssl_status = SSLStatus(GetSecurityStyleForResource( |
- url, !!cert_id, ssl_info.cert_status), |
- cert_id, ssl_info); |
+ url, !!ssl_info.cert, ssl_info.cert_status), |
+ ssl_info.cert, ssl_info); |
} |
ResourceLoader::ResourceLoader(std::unique_ptr<net::URLRequest> request, |
std::unique_ptr<ResourceHandler> handler, |
- CertStore* cert_store, |
ResourceLoaderDelegate* delegate) |
: deferred_stage_(DEFERRED_NONE), |
request_(std::move(request)), |
@@ -167,7 +160,6 @@ ResourceLoader::ResourceLoader(std::unique_ptr<net::URLRequest> request, |
times_cancelled_before_request_start_(0), |
started_request_(false), |
times_cancelled_after_request_start_(0), |
- cert_store_(cert_store), |
weak_ptr_factory_(this) { |
request_->set_delegate(this); |
handler_->SetController(this); |
@@ -228,7 +220,6 @@ void ResourceLoader::MarkAsTransferring( |
CHECK(IsResourceTypeFrame(GetRequestInfo()->GetResourceType())) |
<< "Can only transfer for navigations"; |
is_transferring_ = true; |
- transferring_response_ = response; |
int child_id = GetRequestInfo()->GetChildID(); |
AppCacheInterceptor::PrepareForCrossSiteTransfer(request(), child_id); |
@@ -246,7 +237,6 @@ void ResourceLoader::CompleteTransfer() { |
DCHECK(DEFERRED_READ == deferred_stage_ || |
DEFERRED_RESPONSE_COMPLETE == deferred_stage_); |
DCHECK(is_transferring_); |
- DCHECK(transferring_response_); |
// In some cases, a process transfer doesn't really happen and the |
// request is resumed in the original process. Real transfers to a new process |
@@ -260,7 +250,6 @@ void ResourceLoader::CompleteTransfer() { |
handler->MaybeCompleteCrossSiteTransferInOldProcess(child_id); |
is_transferring_ = false; |
- transferring_response_ = nullptr; |
GetRequestInfo()->cross_site_handler()->ResumeResponse(); |
} |
@@ -301,7 +290,7 @@ void ResourceLoader::OnReceivedRedirect(net::URLRequest* unused, |
} |
scoped_refptr<ResourceResponse> response = new ResourceResponse(); |
- PopulateResourceResponse(info, request_.get(), cert_store_, response.get()); |
+ PopulateResourceResponse(info, request_.get(), response.get()); |
delegate_->DidReceiveRedirect(this, redirect_info.new_url, response.get()); |
if (!handler_->OnRequestRedirected(redirect_info, response.get(), defer)) { |
Cancel(); |
@@ -564,7 +553,7 @@ void ResourceLoader::CancelRequestInternal(int error, bool from_renderer) { |
void ResourceLoader::CompleteResponseStarted() { |
ResourceRequestInfoImpl* info = GetRequestInfo(); |
scoped_refptr<ResourceResponse> response = new ResourceResponse(); |
- PopulateResourceResponse(info, request_.get(), cert_store_, response.get()); |
+ PopulateResourceResponse(info, request_.get(), response.get()); |
delegate_->DidReceiveResponse(this); |
@@ -685,7 +674,7 @@ void ResourceLoader::ResponseCompleted() { |
// TODO(jam): keep this call temporarily since it's what adds the |
// certificate to the CertStore. |
GetSSLStatusForRequest(request_->url(), ssl_info, info->GetChildID(), |
- cert_store_, &ssl_status); |
+ &ssl_status); |
} |
bool defer = false; |