OLD | NEW |
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/proxy_service_factory.h" | 5 #include "chrome/browser/net/proxy_service_factory.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/string_number_conversions.h" | 8 #include "base/string_number_conversions.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/net/pref_proxy_config_service.h" | 10 #include "chrome/browser/net/pref_proxy_config_service.h" |
11 #include "chrome/browser/io_thread.h" | 11 #include "chrome/browser/io_thread.h" |
12 #include "chrome/common/chrome_switches.h" | 12 #include "chrome/common/chrome_switches.h" |
13 #include "content/browser/browser_thread.h" | 13 #include "content/browser/browser_thread.h" |
14 #include "net/base/net_log.h" | 14 #include "net/base/net_log.h" |
| 15 #include "net/proxy/dhcp_proxy_script_fetcher_factory.h" |
15 #include "net/proxy/proxy_config_service.h" | 16 #include "net/proxy/proxy_config_service.h" |
16 #include "net/proxy/proxy_script_fetcher_impl.h" | 17 #include "net/proxy/proxy_script_fetcher_impl.h" |
17 #include "net/proxy/proxy_service.h" | 18 #include "net/proxy/proxy_service.h" |
18 #include "net/url_request/url_request_context.h" | 19 #include "net/url_request/url_request_context.h" |
19 | 20 |
20 #if defined(OS_CHROMEOS) | 21 #if defined(OS_CHROMEOS) |
21 #include "chrome/browser/chromeos/cros/cros_library.h" | 22 #include "chrome/browser/chromeos/cros/cros_library.h" |
22 #include "chrome/browser/chromeos/cros/libcros_service_library.h" | 23 #include "chrome/browser/chromeos/cros/libcros_service_library.h" |
23 #include "chrome/browser/chromeos/proxy_config_service.h" | 24 #include "chrome/browser/chromeos/proxy_config_service.h" |
24 #endif // defined(OS_CHROMEOS) | 25 #endif // defined(OS_CHROMEOS) |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 LOG(ERROR) << "Invalid switch for number of PAC threads: " << s; | 82 LOG(ERROR) << "Invalid switch for number of PAC threads: " << s; |
82 } | 83 } |
83 } | 84 } |
84 | 85 |
85 net::ProxyService* proxy_service; | 86 net::ProxyService* proxy_service; |
86 if (use_v8) { | 87 if (use_v8) { |
87 proxy_service = net::ProxyService::CreateUsingV8ProxyResolver( | 88 proxy_service = net::ProxyService::CreateUsingV8ProxyResolver( |
88 proxy_config_service, | 89 proxy_config_service, |
89 num_pac_threads, | 90 num_pac_threads, |
90 new net::ProxyScriptFetcherImpl(context), | 91 new net::ProxyScriptFetcherImpl(context), |
| 92 net::DhcpProxyScriptFetcherFactory::Create(context), |
91 context->host_resolver(), | 93 context->host_resolver(), |
92 net_log); | 94 net_log); |
93 } else { | 95 } else { |
94 proxy_service = net::ProxyService::CreateUsingSystemProxyResolver( | 96 proxy_service = net::ProxyService::CreateUsingSystemProxyResolver( |
95 proxy_config_service, | 97 proxy_config_service, |
96 num_pac_threads, | 98 num_pac_threads, |
97 net_log); | 99 net_log); |
98 } | 100 } |
99 | 101 |
100 #if defined(OS_CHROMEOS) | 102 #if defined(OS_CHROMEOS) |
101 if (chromeos::CrosLibrary::Get()->EnsureLoaded()) { | 103 if (chromeos::CrosLibrary::Get()->EnsureLoaded()) { |
102 chromeos::CrosLibrary::Get()->GetLibCrosServiceLibrary()->StartService(); | 104 chromeos::CrosLibrary::Get()->GetLibCrosServiceLibrary()->StartService(); |
103 } | 105 } |
104 #endif // defined(OS_CHROMEOS) | 106 #endif // defined(OS_CHROMEOS) |
105 | 107 |
106 return proxy_service; | 108 return proxy_service; |
107 } | 109 } |
OLD | NEW |