diff --git a/brightray/browser/url_request_context_getter.cc b/brightray/browser/url_request_context_getter.cc index 6edd4b150eb2..bf837d741e8c 100644 --- a/brightray/browser/url_request_context_getter.cc +++ b/brightray/browser/url_request_context_getter.cc @@ -44,6 +44,10 @@ #include "url/url_constants.h" #include "storage/browser/quota/special_storage_policy.h" +#if defined(USE_NSS_CERTS) +#include "net/cert_net/nss_ocsp.h" +#endif + using content::BrowserThread; namespace brightray { @@ -156,6 +160,9 @@ URLRequestContextGetter::URLRequestContextGetter( } URLRequestContextGetter::~URLRequestContextGetter() { +#if defined(USE_NSS_CERTS) + net::SetURLRequestContextForNSSHttpIO(NULL); +#endif } net::HostResolver* URLRequestContextGetter::host_resolver() { @@ -169,6 +176,10 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() { auto& command_line = *base::CommandLine::ForCurrentProcess(); url_request_context_.reset(new net::URLRequestContext); + #if defined(USE_NSS_CERTS) + net::SetURLRequestContextForNSSHttpIO(url_request_context_.get()); + #endif + // --log-net-log net_log_->StartLogging(url_request_context_.get()); url_request_context_->set_net_log(net_log_);