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

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

Issue 2845643003: Allow ProxyService to share URLRequestContext with everything else. (Closed)
Patch Set: Fix fetcher shutdown with no active request, add test, add comment Created 3 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
« 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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 LoadState GetLoadState(const PacRequest* pac_request) const; 218 LoadState GetLoadState(const PacRequest* pac_request) const;
219 219
220 // Sets the ProxyScriptFetcher and DhcpProxyScriptFetcher dependencies. This 220 // Sets the ProxyScriptFetcher and DhcpProxyScriptFetcher dependencies. This
221 // is needed if the ProxyResolver is of type ProxyResolverWithoutFetch. 221 // is needed if the ProxyResolver is of type ProxyResolverWithoutFetch.
222 // ProxyService takes ownership of proxy_script_fetcher. 222 // ProxyService takes ownership of proxy_script_fetcher.
223 void SetProxyScriptFetchers( 223 void SetProxyScriptFetchers(
224 ProxyScriptFetcher* proxy_script_fetcher, 224 ProxyScriptFetcher* proxy_script_fetcher,
225 std::unique_ptr<DhcpProxyScriptFetcher> dhcp_proxy_script_fetcher); 225 std::unique_ptr<DhcpProxyScriptFetcher> dhcp_proxy_script_fetcher);
226 ProxyScriptFetcher* GetProxyScriptFetcher() const; 226 ProxyScriptFetcher* GetProxyScriptFetcher() const;
227 227
228 // Cancels all network requests, and prevents the service from creating new
229 // ones. Must be called before the URLRequestContext the ProxyService was
230 // created with is torn down, if it's torn down before th ProxyService itself.
231 void OnShutdown();
232
228 // Tells this ProxyService to start using a new ProxyConfigService to 233 // Tells this ProxyService to start using a new ProxyConfigService to
229 // retrieve its ProxyConfig from. The new ProxyConfigService will immediately 234 // retrieve its ProxyConfig from. The new ProxyConfigService will immediately
230 // be queried for new config info which will be used for all subsequent 235 // be queried for new config info which will be used for all subsequent
231 // ResolveProxy calls. 236 // ResolveProxy calls.
232 void ResetConfigService( 237 void ResetConfigService(
233 std::unique_ptr<ProxyConfigService> new_proxy_config_service); 238 std::unique_ptr<ProxyConfigService> new_proxy_config_service);
234 239
235 // Returns the last configuration fetched from ProxyConfigService. 240 // Returns the last configuration fetched from ProxyConfigService.
236 const ProxyConfig& fetched_config() { 241 const ProxyConfig& fetched_config() {
237 return fetched_config_; 242 return fetched_config_;
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 484
480 // The method to use for sanitizing URLs seen by the proxy resolver. 485 // The method to use for sanitizing URLs seen by the proxy resolver.
481 SanitizeUrlPolicy sanitize_url_policy_; 486 SanitizeUrlPolicy sanitize_url_policy_;
482 487
483 DISALLOW_COPY_AND_ASSIGN(ProxyService); 488 DISALLOW_COPY_AND_ASSIGN(ProxyService);
484 }; 489 };
485 490
486 } // namespace net 491 } // namespace net
487 492
488 #endif // NET_PROXY_PROXY_SERVICE_H_ 493 #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