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

Side by Side Diff: net/proxy/proxy_service.h

Issue 1290243007: Shift URLRequestContextStorage over to taking scoped_ptrs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Paul_BuilderGrab
Patch Set: Sync'd to revision p349162. Created 5 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
« no previous file with comments | « net/proxy/proxy_script_fetcher_impl_unittest.cc ('k') | net/proxy/proxy_service.cc » ('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 #ifndef NET_PROXY_PROXY_SERVICE_H_ 5 #ifndef NET_PROXY_PROXY_SERVICE_H_
6 #define NET_PROXY_PROXY_SERVICE_H_ 6 #define NET_PROXY_PROXY_SERVICE_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 } 228 }
229 229
230 // Forces refetching the proxy configuration, and applying it. 230 // Forces refetching the proxy configuration, and applying it.
231 // This re-does everything from fetching the system configuration, 231 // This re-does everything from fetching the system configuration,
232 // to downloading and testing the PAC files. 232 // to downloading and testing the PAC files.
233 void ForceReloadProxyConfig(); 233 void ForceReloadProxyConfig();
234 234
235 // Same as CreateProxyServiceUsingV8ProxyResolver, except it uses system 235 // Same as CreateProxyServiceUsingV8ProxyResolver, except it uses system
236 // libraries for evaluating the PAC script if available, otherwise skips 236 // libraries for evaluating the PAC script if available, otherwise skips
237 // proxy autoconfig. 237 // proxy autoconfig.
238 static ProxyService* CreateUsingSystemProxyResolver( 238 static scoped_ptr<ProxyService> CreateUsingSystemProxyResolver(
239 ProxyConfigService* proxy_config_service, 239 ProxyConfigService* proxy_config_service,
240 size_t num_pac_threads, 240 size_t num_pac_threads,
241 NetLog* net_log); 241 NetLog* net_log);
242 242
243 // Creates a ProxyService without support for proxy autoconfig. 243 // Creates a ProxyService without support for proxy autoconfig.
244 static ProxyService* CreateWithoutProxyResolver( 244 static scoped_ptr<ProxyService> CreateWithoutProxyResolver(
245 ProxyConfigService* proxy_config_service, 245 ProxyConfigService* proxy_config_service,
246 NetLog* net_log); 246 NetLog* net_log);
247 247
248 // Convenience methods that creates a proxy service using the 248 // Convenience methods that creates a proxy service using the
249 // specified fixed settings. 249 // specified fixed settings.
250 static ProxyService* CreateFixed(const ProxyConfig& pc); 250 static scoped_ptr<ProxyService> CreateFixed(const ProxyConfig& pc);
251 static ProxyService* CreateFixed(const std::string& proxy); 251 static scoped_ptr<ProxyService> CreateFixed(const std::string& proxy);
252 252
253 // Creates a proxy service that uses a DIRECT connection for all requests. 253 // Creates a proxy service that uses a DIRECT connection for all requests.
254 static ProxyService* CreateDirect(); 254 static scoped_ptr<ProxyService> CreateDirect();
255 // |net_log|'s lifetime must exceed ProxyService. 255 // |net_log|'s lifetime must exceed ProxyService.
256 static ProxyService* CreateDirectWithNetLog(NetLog* net_log); 256 static scoped_ptr<ProxyService> CreateDirectWithNetLog(NetLog* net_log);
257 257
258 // This method is used by tests to create a ProxyService that returns a 258 // This method is used by tests to create a ProxyService that returns a
259 // hardcoded proxy fallback list (|pac_string|) for every URL. 259 // hardcoded proxy fallback list (|pac_string|) for every URL.
260 // 260 //
261 // |pac_string| is a list of proxy servers, in the format that a PAC script 261 // |pac_string| is a list of proxy servers, in the format that a PAC script
262 // would return it. For example, "PROXY foobar:99; SOCKS fml:2; DIRECT" 262 // would return it. For example, "PROXY foobar:99; SOCKS fml:2; DIRECT"
263 static ProxyService* CreateFixedFromPacResult(const std::string& pac_string); 263 static scoped_ptr<ProxyService> CreateFixedFromPacResult(
264 const std::string& pac_string);
264 265
265 // Creates a config service appropriate for this platform that fetches the 266 // Creates a config service appropriate for this platform that fetches the
266 // system proxy settings. 267 // system proxy settings.
267 static ProxyConfigService* CreateSystemProxyConfigService( 268 static ProxyConfigService* CreateSystemProxyConfigService(
268 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner, 269 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner,
269 const scoped_refptr<base::SingleThreadTaskRunner>& file_task_runner); 270 const scoped_refptr<base::SingleThreadTaskRunner>& file_task_runner);
270 271
271 // This method should only be used by unit tests. 272 // This method should only be used by unit tests.
272 void set_stall_proxy_auto_config_delay(base::TimeDelta delay) { 273 void set_stall_proxy_auto_config_delay(base::TimeDelta delay) {
273 stall_proxy_auto_config_delay_ = delay; 274 stall_proxy_auto_config_delay_ = delay;
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 450
450 // Whether child ProxyScriptDeciders should use QuickCheck 451 // Whether child ProxyScriptDeciders should use QuickCheck
451 bool quick_check_enabled_; 452 bool quick_check_enabled_;
452 453
453 DISALLOW_COPY_AND_ASSIGN(ProxyService); 454 DISALLOW_COPY_AND_ASSIGN(ProxyService);
454 }; 455 };
455 456
456 } // namespace net 457 } // namespace net
457 458
458 #endif // NET_PROXY_PROXY_SERVICE_H_ 459 #endif // NET_PROXY_PROXY_SERVICE_H_
OLDNEW
« no previous file with comments | « net/proxy/proxy_script_fetcher_impl_unittest.cc ('k') | net/proxy/proxy_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698