Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(272)

Unified Diff: content/shell/shell_url_request_context_getter.cc

Issue 10912132: Move ProxyConfigService construction onto the IO thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tiny fix for get_server_time Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..198937cd48a3d6dd7f4ace147d0fb87bd1bffbac 100644
--- a/content/shell/shell_url_request_context_getter.cc
+++ b/content/shell/shell_url_request_context_getter.cc
@@ -39,15 +39,6 @@ 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() {
@@ -76,6 +67,10 @@ net::URLRequestContext* ShellURLRequestContextGetter::GetURLRequestContext() {
net::HostResolver::kDefaultRetryAttempts,
NULL));
storage_->set_cert_verifier(net::CertVerifier::CreateDefault());
+ proxy_config_service_.reset(
+ net::ProxyService::CreateSystemProxyConfigService(
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI),
+ file_loop_));
// TODO(jam): use v8 if possible, look at chrome code.
storage_->set_proxy_service(
net::ProxyService::CreateUsingSystemProxyResolver(

Powered by Google App Engine
This is Rietveld 408576698