Merge pull request #156 from deepak1556/nss_ocsp_patch

provide request context for oscp session creation
This commit is contained in:
Cheng Zhao 2015-10-14 09:46:28 +08:00
commit cab52fedc6

View file

@ -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_);