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

Side by Side Diff: webkit/tools/test_shell/test_shell_request_context.cc

Issue 11938006: Turn off the network proxy for mac and win in DRT (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/tools/test_shell/test_shell_request_context.h" 5 #include "webkit/tools/test_shell/test_shell_request_context.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 const FilePath& cache_path, 73 const FilePath& cache_path,
74 net::HttpCache::Mode cache_mode, 74 net::HttpCache::Mode cache_mode,
75 bool no_proxy) { 75 bool no_proxy) {
76 storage_.set_cookie_store(new net::CookieMonster(NULL, NULL)); 76 storage_.set_cookie_store(new net::CookieMonster(NULL, NULL));
77 storage_.set_server_bound_cert_service(new net::ServerBoundCertService( 77 storage_.set_server_bound_cert_service(new net::ServerBoundCertService(
78 new net::DefaultServerBoundCertStore(NULL), 78 new net::DefaultServerBoundCertStore(NULL),
79 base::WorkerPool::GetTaskRunner(true))); 79 base::WorkerPool::GetTaskRunner(true)));
80 80
81 storage_.set_http_user_agent_settings(new TestShellHttpUserAgentSettings); 81 storage_.set_http_user_agent_settings(new TestShellHttpUserAgentSettings);
82 82
83 #if defined(OS_POSIX) && !defined(OS_MACOSX) 83 // Use no proxy; it's not needed for testing and just breaks things.
84 // Use no proxy to avoid ProxyConfigServiceLinux.
85 // Enabling use of the ProxyConfigServiceLinux requires:
86 // -Calling from a thread with a TYPE_UI MessageLoop,
87 // -If at all possible, passing in a pointer to the IO thread's MessageLoop,
88 // -Keep in mind that proxy auto configuration is also
89 // non-functional on linux in this context because of v8 threading
90 // issues.
91 // TODO(port): rename "linux" to some nonspecific unix.
92 scoped_ptr<net::ProxyConfigService> proxy_config_service( 84 scoped_ptr<net::ProxyConfigService> proxy_config_service(
93 new net::ProxyConfigServiceFixed(net::ProxyConfig())); 85 new net::ProxyConfigServiceFixed(net::ProxyConfig()));
94 #else 86
95 // Use the system proxy settings.
96 scoped_ptr<net::ProxyConfigService> proxy_config_service(
97 net::ProxyService::CreateSystemProxyConfigService(
98 base::ThreadTaskRunnerHandle::Get(), NULL));
99 #endif
100 storage_.set_host_resolver(net::HostResolver::CreateDefaultResolver(NULL)); 87 storage_.set_host_resolver(net::HostResolver::CreateDefaultResolver(NULL));
101 storage_.set_cert_verifier(net::CertVerifier::CreateDefault()); 88 storage_.set_cert_verifier(net::CertVerifier::CreateDefault());
102 storage_.set_proxy_service(net::ProxyService::CreateUsingSystemProxyResolver( 89 storage_.set_proxy_service(net::ProxyService::CreateUsingSystemProxyResolver(
103 proxy_config_service.release(), 0, NULL)); 90 proxy_config_service.release(), 0, NULL));
104 storage_.set_ssl_config_service( 91 storage_.set_ssl_config_service(
105 new net::SSLConfigServiceDefaults); 92 new net::SSLConfigServiceDefaults);
106 93
107 storage_.set_http_auth_handler_factory( 94 storage_.set_http_auth_handler_factory(
108 net::HttpAuthHandlerFactory::CreateDefault(host_resolver())); 95 net::HttpAuthHandlerFactory::CreateDefault(host_resolver()));
109 storage_.set_http_server_properties( 96 storage_.set_http_server_properties(
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 file_system_context_, 133 file_system_context_,
147 SimpleResourceLoaderBridge::GetIoThread())); 134 SimpleResourceLoaderBridge::GetIoThread()));
148 job_factory->SetProtocolHandler( 135 job_factory->SetProtocolHandler(
149 "filesystem", 136 "filesystem",
150 fileapi::CreateFileSystemProtocolHandler(file_system_context_.get())); 137 fileapi::CreateFileSystemProtocolHandler(file_system_context_.get()));
151 storage_.set_job_factory(job_factory); 138 storage_.set_job_factory(job_factory);
152 } 139 }
153 140
154 TestShellRequestContext::~TestShellRequestContext() { 141 TestShellRequestContext::~TestShellRequestContext() {
155 } 142 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698