Index: content/shell/shell_url_request_context_getter.cc |
diff --git a/content/shell/shell_url_request_context_getter.cc b/content/shell/shell_url_request_context_getter.cc |
index f612fa56a61f9e4d043da2a31e1daf151306c072..f1cb95fe8f1a11f970b8390100ba0b18ce595bd2 100644 |
--- a/content/shell/shell_url_request_context_getter.cc |
+++ b/content/shell/shell_url_request_context_getter.cc |
@@ -39,20 +39,16 @@ ShellURLRequestContextGetter::ShellURLRequestContextGetter( |
base_path_(base_path), |
io_loop_(io_loop), |
file_loop_(file_loop) { |
- // Must first be created on the UI thread. |
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
- |
- // We must create the proxy config service on the UI loop on Linux because it |
- // must synchronously run on the glib message loop. This will be passed to |
- // the URLRequestContextStorage on the IO thread in GetURLRequestContext(). |
- proxy_config_service_.reset( |
- net::ProxyService::CreateSystemProxyConfigService( |
- io_loop_->message_loop_proxy(), file_loop_)); |
} |
ShellURLRequestContextGetter::~ShellURLRequestContextGetter() { |
} |
+void ShellURLRequestContextGetter::StartTearDown() { |
+ if (url_request_context_.get()) |
+ url_request_context_->proxy_service()->StartTearDown(); |
+} |
+ |
net::URLRequestContext* ShellURLRequestContextGetter::GetURLRequestContext() { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
@@ -79,9 +75,11 @@ net::URLRequestContext* ShellURLRequestContextGetter::GetURLRequestContext() { |
// TODO(jam): use v8 if possible, look at chrome code. |
storage_->set_proxy_service( |
net::ProxyService::CreateUsingSystemProxyResolver( |
- proxy_config_service_.release(), |
- 0, |
- NULL)); |
+ net::ProxyService::CreateSystemProxyConfigService( |
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), |
+ file_loop_), |
+ 0, |
+ NULL)); |
storage_->set_ssl_config_service(new net::SSLConfigServiceDefaults); |
storage_->set_http_auth_handler_factory( |
net::HttpAuthHandlerFactory::CreateDefault( |