| Index: chrome/browser/io_thread.cc
|
| diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
|
| index 050d4e8311d6af9231ef23080b74412b5a456d22..4d9f63bcea991bf5cff72c976e8d66d3132e8197 100644
|
| --- a/chrome/browser/io_thread.cc
|
| +++ b/chrome/browser/io_thread.cc
|
| @@ -181,34 +181,6 @@ base::FilePath GetSSLKeyLogFile(const base::CommandLine& command_line) {
|
| #endif
|
| }
|
|
|
| -// Used for the "system" URLRequestContext.
|
| -class SystemURLRequestContext : public net::URLRequestContext {
|
| - public:
|
| - SystemURLRequestContext() {
|
| -#if defined(USE_NSS_CERTS)
|
| - net::SetURLRequestContextForNSSHttpIO(this);
|
| -#endif
|
| -#if defined(OS_ANDROID)
|
| - net::CertVerifyProcAndroid::SetCertNetFetcher(
|
| - net::CreateCertNetFetcher(this));
|
| -#endif
|
| - }
|
| -
|
| - ~SystemURLRequestContext() override {
|
| - AssertNoURLRequests();
|
| -#if defined(USE_NSS_CERTS)
|
| - net::SetURLRequestContextForNSSHttpIO(NULL);
|
| -#endif
|
| -
|
| -#if defined(OS_ANDROID)
|
| - net::CertVerifyProcAndroid::ShutdownCertNetFetcher();
|
| -#endif
|
| - }
|
| -
|
| - private:
|
| - DISALLOW_COPY_AND_ASSIGN(SystemURLRequestContext);
|
| -};
|
| -
|
| std::unique_ptr<net::HostResolver> CreateGlobalHostResolver(
|
| net::NetLog* net_log) {
|
| TRACE_EVENT0("startup", "IOThread::CreateGlobalHostResolver");
|
| @@ -644,9 +616,18 @@ void IOThread::CleanUp() {
|
| ct_tree_tracker_.reset();
|
| }
|
|
|
| - if (globals_->system_request_context)
|
| + if (globals_->system_request_context) {
|
| globals_->system_request_context->proxy_service()->OnShutdown();
|
|
|
| +#if defined(USE_NSS_CERTS)
|
| + net::SetURLRequestContextForNSSHttpIO(nullptr);
|
| +#endif
|
| +
|
| +#if defined(OS_ANDROID)
|
| + net::CertVerifyProcAndroid::ShutdownCertNetFetcher();
|
| +#endif
|
| + }
|
| +
|
| // Release objects that the net::URLRequestContext could have been pointing
|
| // to.
|
|
|
| @@ -887,6 +868,14 @@ void IOThread::ConstructSystemRequestContext() {
|
| builder.DisableHttpCache();
|
|
|
| globals_->system_request_context = builder.Build();
|
| +
|
| +#if defined(USE_NSS_CERTS)
|
| + net::SetURLRequestContextForNSSHttpIO(globals_->system_request_context.get());
|
| +#endif
|
| +#if defined(OS_ANDROID)
|
| + net::CertVerifyProcAndroid::SetCertNetFetcher(
|
| + net::CreateCertNetFetcher(globals_->system_request_context.get()));
|
| +#endif
|
| }
|
|
|
| // static
|
|
|