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

Side by Side Diff: chrome/browser/net/connection_tester.cc

Issue 6831025: Adds support for the DHCP portion of the WPAD (proxy auto-discovery) protocol. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Responding to review comments. Created 9 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/net/connection_tester.h" 5 #include "chrome/browser/net/connection_tester.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
11 #include "base/task.h" 11 #include "base/task.h"
12 #include "base/threading/thread_restrictions.h" 12 #include "base/threading/thread_restrictions.h"
13 #include "base/utf_string_conversions.h" 13 #include "base/utf_string_conversions.h"
14 #include "chrome/browser/importer/firefox_proxy_settings.h" 14 #include "chrome/browser/importer/firefox_proxy_settings.h"
15 #include "chrome/common/chrome_switches.h" 15 #include "chrome/common/chrome_switches.h"
16 #include "net/base/cert_verifier.h" 16 #include "net/base/cert_verifier.h"
17 #include "net/base/cookie_monster.h" 17 #include "net/base/cookie_monster.h"
18 #include "net/base/dnsrr_resolver.h" 18 #include "net/base/dnsrr_resolver.h"
19 #include "net/base/host_resolver.h" 19 #include "net/base/host_resolver.h"
20 #include "net/base/host_resolver_impl.h" 20 #include "net/base/host_resolver_impl.h"
21 #include "net/base/io_buffer.h" 21 #include "net/base/io_buffer.h"
22 #include "net/base/net_errors.h" 22 #include "net/base/net_errors.h"
23 #include "net/base/net_util.h" 23 #include "net/base/net_util.h"
24 #include "net/base/ssl_config_service_defaults.h" 24 #include "net/base/ssl_config_service_defaults.h"
25 #include "net/ftp/ftp_network_layer.h" 25 #include "net/ftp/ftp_network_layer.h"
26 #include "net/http/http_auth_handler_factory.h" 26 #include "net/http/http_auth_handler_factory.h"
27 #include "net/http/http_cache.h" 27 #include "net/http/http_cache.h"
28 #include "net/http/http_network_session.h" 28 #include "net/http/http_network_session.h"
29 #include "net/proxy/dhcp_proxy_script_fetcher_factory.h"
29 #include "net/proxy/proxy_config_service_fixed.h" 30 #include "net/proxy/proxy_config_service_fixed.h"
30 #include "net/proxy/proxy_script_fetcher_impl.h" 31 #include "net/proxy/proxy_script_fetcher_impl.h"
31 #include "net/proxy/proxy_service.h" 32 #include "net/proxy/proxy_service.h"
32 #include "net/url_request/url_request.h" 33 #include "net/url_request/url_request.h"
33 #include "net/url_request/url_request_context.h" 34 #include "net/url_request/url_request_context.h"
34 #include "net/url_request/url_request_context_storage.h" 35 #include "net/url_request/url_request_context_storage.h"
35 36
36 namespace { 37 namespace {
37 38
38 // ExperimentURLRequestContext ------------------------------------------------ 39 // ExperimentURLRequestContext ------------------------------------------------
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 switches::kSingleProcess)) { 180 switches::kSingleProcess)) {
180 // We can't create a standard proxy resolver in single-process mode. 181 // We can't create a standard proxy resolver in single-process mode.
181 // Rather than falling-back to some other implementation, fail. 182 // Rather than falling-back to some other implementation, fail.
182 return net::ERR_NOT_IMPLEMENTED; 183 return net::ERR_NOT_IMPLEMENTED;
183 } 184 }
184 185
185 proxy_service->reset(net::ProxyService::CreateUsingV8ProxyResolver( 186 proxy_service->reset(net::ProxyService::CreateUsingV8ProxyResolver(
186 config_service.release(), 187 config_service.release(),
187 0u, 188 0u,
188 new net::ProxyScriptFetcherImpl(proxy_request_context_), 189 new net::ProxyScriptFetcherImpl(proxy_request_context_),
190 net::DhcpProxyScriptFetcherFactory::Create(proxy_request_context_),
189 host_resolver(), 191 host_resolver(),
190 NULL)); 192 NULL));
191 193
192 return net::OK; 194 return net::OK;
193 } 195 }
194 196
195 // Creates a proxy config service that pulls from the system proxy settings. 197 // Creates a proxy config service that pulls from the system proxy settings.
196 // On success returns net::OK and fills |config_service| with a new pointer. 198 // On success returns net::OK and fills |config_service| with a new pointer.
197 // Otherwise returns a network error code. 199 // Otherwise returns a network error code.
198 int CreateSystemProxyConfigService( 200 int CreateSystemProxyConfigService(
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 451
450 // Notify the delegate of completion. 452 // Notify the delegate of completion.
451 delegate_->OnCompletedConnectionTestExperiment(current, result); 453 delegate_->OnCompletedConnectionTestExperiment(current, result);
452 454
453 if (remaining_experiments_.empty()) { 455 if (remaining_experiments_.empty()) {
454 delegate_->OnCompletedConnectionTestSuite(); 456 delegate_->OnCompletedConnectionTestSuite();
455 } else { 457 } else {
456 StartNextExperiment(); 458 StartNextExperiment();
457 } 459 }
458 } 460 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698