summaryrefslogtreecommitdiffstats
path: root/net/tools
diff options
context:
space:
mode:
authorwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-26 15:36:01 +0000
committerwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-26 15:36:01 +0000
commit1d79d0ef86d742a7da033093aa14ec199aa3a090 (patch)
tree2f1c3b67396e39e3c8b1276e4edb38f57d640e97 /net/tools
parentb3ef6ccc0b57cf53fe8ea83c740ff2eeabf963f4 (diff)
downloadchromium_src-1d79d0ef86d742a7da033093aa14ec199aa3a090.zip
chromium_src-1d79d0ef86d742a7da033093aa14ec199aa3a090.tar.gz
chromium_src-1d79d0ef86d742a7da033093aa14ec199aa3a090.tar.bz2
fetch_client needs to call set_proxy_config_service on Android and Linux.
This is similar to the change to url_request_context_builder_unittest.cc in https://codereview.chromium.org/10155004. R=eroman@chromium.org,willchan@chromium.org BUG=342145 TEST=Run a debug build of fetch_client on Linux. It should not hit a DCHECK failure. Review URL: https://codereview.chromium.org/180363002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253473 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/tools')
-rw-r--r--net/tools/fetch/fetch_client.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/tools/fetch/fetch_client.cc b/net/tools/fetch/fetch_client.cc
index e6bbb7c..830622c 100644
--- a/net/tools/fetch/fetch_client.cc
+++ b/net/tools/fetch/fetch_client.cc
@@ -17,6 +17,11 @@
#include "net/url_request/url_request_context_getter.h"
#include "url/gurl.h"
+#if defined(OS_LINUX) || defined(OS_ANDROID)
+#include "net/proxy/proxy_config.h"
+#include "net/proxy/proxy_config_service_fixed.h"
+#endif // defined(OS_LINUX) || defined(OS_ANDROID)
+
using net::URLFetcher;
using net::URLFetcherDelegate;
using net::URLRequestContextGetter;
@@ -51,6 +56,11 @@ BuildURLRequestContext(bool use_cache) {
builder.set_file_enabled(true);
builder.set_data_enabled(true);
builder.set_ftp_enabled(true);
+#if defined(OS_LINUX) || defined(OS_ANDROID)
+ // TODO(wtc): Remove this once http://crbug.com/146421 is fixed.
+ builder.set_proxy_config_service(
+ new net::ProxyConfigServiceFixed(net::ProxyConfig::CreateDirect()));
+#endif // defined(OS_LINUX) || defined(OS_ANDROID)
if (!use_cache)
builder.DisableHttpCache();
scoped_ptr<net::URLRequestContext> context(builder.Build());