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

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

Issue 10874077: net: Add a new target 'net_with_v8'. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fuck win - I hate you Created 8 years, 3 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
« no previous file with comments | « chrome/browser/net/connection_tester.cc ('k') | chrome/chrome_browser.gypi » ('j') | 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 "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 "base/threading/thread.h" 9 #include "base/threading/thread.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
11 #include "chrome/browser/io_thread.h" 11 #include "chrome/browser/io_thread.h"
12 #include "chrome/browser/net/pref_proxy_config_tracker.h" 12 #include "chrome/browser/net/pref_proxy_config_tracker.h"
13 #include "chrome/common/chrome_switches.h" 13 #include "chrome/common/chrome_switches.h"
14 #include "content/public/browser/browser_thread.h" 14 #include "content/public/browser/browser_thread.h"
15 #include "net/base/net_log.h" 15 #include "net/base/net_log.h"
16 #include "net/proxy/dhcp_proxy_script_fetcher_factory.h" 16 #include "net/proxy/dhcp_proxy_script_fetcher_factory.h"
17 #include "net/proxy/proxy_config_service.h" 17 #include "net/proxy/proxy_config_service.h"
18 #include "net/proxy/proxy_script_fetcher_impl.h" 18 #include "net/proxy/proxy_script_fetcher_impl.h"
19 #include "net/proxy/proxy_service.h" 19 #include "net/proxy/proxy_service.h"
20 #include "net/proxy/proxy_service_v8.h"
20 #include "net/url_request/url_request_context.h" 21 #include "net/url_request/url_request_context.h"
21 22
22 #if defined(OS_CHROMEOS) 23 #if defined(OS_CHROMEOS)
23 #include "chrome/browser/chromeos/proxy_config_service_impl.h" 24 #include "chrome/browser/chromeos/proxy_config_service_impl.h"
24 #endif // defined(OS_CHROMEOS) 25 #endif // defined(OS_CHROMEOS)
25 26
26 using content::BrowserThread; 27 using content::BrowserThread;
27 28
28 // static 29 // static
29 ChromeProxyConfigService* ProxyServiceFactory::CreateProxyConfigService( 30 ChromeProxyConfigService* ProxyServiceFactory::CreateProxyConfigService(
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 } 102 }
102 } 103 }
103 104
104 net::ProxyService* proxy_service; 105 net::ProxyService* proxy_service;
105 if (use_v8) { 106 if (use_v8) {
106 net::DhcpProxyScriptFetcherFactory dhcp_factory; 107 net::DhcpProxyScriptFetcherFactory dhcp_factory;
107 if (command_line.HasSwitch(switches::kDisableDhcpWpad)) { 108 if (command_line.HasSwitch(switches::kDisableDhcpWpad)) {
108 dhcp_factory.set_enabled(false); 109 dhcp_factory.set_enabled(false);
109 } 110 }
110 111
111 proxy_service = net::ProxyService::CreateUsingV8ProxyResolver( 112 proxy_service = net::CreateProxyServiceUsingV8ProxyResolver(
112 proxy_config_service, 113 proxy_config_service,
113 num_pac_threads, 114 num_pac_threads,
114 new net::ProxyScriptFetcherImpl(context), 115 new net::ProxyScriptFetcherImpl(context),
115 dhcp_factory.Create(context), 116 dhcp_factory.Create(context),
116 context->host_resolver(), 117 context->host_resolver(),
117 net_log, 118 net_log,
118 context->network_delegate()); 119 context->network_delegate());
119 } else { 120 } else {
120 proxy_service = net::ProxyService::CreateUsingSystemProxyResolver( 121 proxy_service = net::ProxyService::CreateUsingSystemProxyResolver(
121 proxy_config_service, 122 proxy_config_service,
122 num_pac_threads, 123 num_pac_threads,
123 net_log); 124 net_log);
124 } 125 }
125 126
126 return proxy_service; 127 return proxy_service;
127 } 128 }
OLDNEW
« no previous file with comments | « chrome/browser/net/connection_tester.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698