diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-20 01:19:38 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-20 01:19:38 +0000 |
commit | 6a2a4893d23197113f986b64d71d8bb5aa2d19e5 (patch) | |
tree | 8f928b7af385a1dc6ecc86046de2f0b7420e4d1f /content | |
parent | 8fc361adaba001ff8d05475aae642d61b19d3963 (diff) | |
download | chromium_src-6a2a4893d23197113f986b64d71d8bb5aa2d19e5.zip chromium_src-6a2a4893d23197113f986b64d71d8bb5aa2d19e5.tar.gz chromium_src-6a2a4893d23197113f986b64d71d8bb5aa2d19e5.tar.bz2 |
[content shell] don't use a proxy for running layout tests
BUG=170826
R=dpranke@chromium.org
Review URL: https://chromiumcodereview.appspot.com/12025033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177867 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/shell/shell_url_request_context_getter.cc | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/content/shell/shell_url_request_context_getter.cc b/content/shell/shell_url_request_context_getter.cc index 3c4cb12..7bda6f9 100644 --- a/content/shell/shell_url_request_context_getter.cc +++ b/content/shell/shell_url_request_context_getter.cc @@ -13,6 +13,7 @@ #include "content/public/browser/browser_thread.h" #include "content/public/common/content_switches.h" #include "content/shell/shell_network_delegate.h" +#include "content/shell/shell_switches.h" #include "net/base/cert_verifier.h" #include "net/base/default_server_bound_cert_store.h" #include "net/base/host_resolver.h" @@ -47,9 +48,11 @@ ShellURLRequestContextGetter::ShellURLRequestContextGetter( // 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_)); + if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) { + proxy_config_service_.reset( + net::ProxyService::CreateSystemProxyConfigService( + io_loop_->message_loop_proxy(), file_loop_)); + } } ShellURLRequestContextGetter::~ShellURLRequestContextGetter() { @@ -78,12 +81,16 @@ net::URLRequestContext* ShellURLRequestContextGetter::GetURLRequestContext() { net::HostResolver::CreateDefaultResolver(NULL)); storage_->set_cert_verifier(net::CertVerifier::CreateDefault()); - // TODO(jam): use v8 if possible, look at chrome code. - storage_->set_proxy_service( - net::ProxyService::CreateUsingSystemProxyResolver( - proxy_config_service_.release(), - 0, - NULL)); + if (command_line.HasSwitch(switches::kDumpRenderTree)) { + storage_->set_proxy_service(net::ProxyService::CreateDirect()); + } else { + // TODO(jam): use v8 if possible, look at chrome code. + storage_->set_proxy_service( + net::ProxyService::CreateUsingSystemProxyResolver( + proxy_config_service_.release(), + 0, + NULL)); + } storage_->set_ssl_config_service(new net::SSLConfigServiceDefaults); storage_->set_http_auth_handler_factory( net::HttpAuthHandlerFactory::CreateDefault(host_resolver.get())); |