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

Unified Diff: net/proxy/proxy_service.h

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, 8 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 side-by-side diff with in-line comments
Download patch
Index: net/proxy/proxy_service.h
diff --git a/net/proxy/proxy_service.h b/net/proxy/proxy_service.h
index 5f6cbf2d5e813d3d70643e26db64479d03f267cd..640c1a8be5775a4d7ec17b7e74fe43e370634860 100644
--- a/net/proxy/proxy_service.h
+++ b/net/proxy/proxy_service.h
@@ -25,6 +25,7 @@ class MessageLoop;
namespace net {
+class DhcpProxyScriptFetcher;
class HostResolver;
class InitProxyResolver;
class ProxyResolver;
@@ -97,11 +98,14 @@ class ProxyService : public NetworkChangeNotifier::IPAddressObserver,
// Call this method with a non-null |pac_request| to cancel the PAC request.
void CancelPacRequest(PacRequest* pac_request);
- // Sets the ProxyScriptFetcher dependency. This is needed if the ProxyResolver
- // is of type ProxyResolverWithoutFetch. ProxyService takes ownership of
- // |proxy_script_fetcher|.
- void SetProxyScriptFetcher(ProxyScriptFetcher* proxy_script_fetcher);
+ // Sets the ProxyScriptFetcher and DhcpProxyScriptFetcher dependencies. This
+ // is needed if the ProxyResolver is of type ProxyResolverWithoutFetch.
+ // ProxyService takes ownership of both objects.
+ void SetProxyScriptFetchers(
+ ProxyScriptFetcher* proxy_script_fetcher,
+ DhcpProxyScriptFetcher* dhcp_proxy_script_fetcher);
ProxyScriptFetcher* GetProxyScriptFetcher() const;
+ DhcpProxyScriptFetcher* GetDhcpProxyScriptFetcher() const;
// Tells this ProxyService to start using a new ProxyConfigService to
// retrieve its ProxyConfig from. The new ProxyConfigService will immediately
@@ -160,6 +164,10 @@ class ProxyService : public NetworkChangeNotifier::IPAddressObserver,
// |proxy_script_fetcher| specifies the dependency to use for downloading
// any PAC scripts. The resulting ProxyService will take ownership of it.
//
+ // |dhcp_proxy_script_fetcher| specifies the dependency to use for attempting
+ // to retrieve the most appropriate PAC script configured in DHCP. The
+ // resulting ProxyService will take ownership of it.
+ //
// |host_resolver| points to the host resolving dependency the PAC script
// should use for any DNS queries. It must remain valid throughout the
// lifetime of the ProxyService.
@@ -173,6 +181,7 @@ class ProxyService : public NetworkChangeNotifier::IPAddressObserver,
ProxyConfigService* proxy_config_service,
size_t num_pac_threads,
ProxyScriptFetcher* proxy_script_fetcher,
+ DhcpProxyScriptFetcher* dhcp_proxy_script_fetcher,
HostResolver* host_resolver,
NetLog* net_log);
@@ -317,6 +326,11 @@ class ProxyService : public NetworkChangeNotifier::IPAddressObserver,
// external PAC script fetching.
scoped_ptr<ProxyScriptFetcher> proxy_script_fetcher_;
+ // The fetcher to use when attempting to download the most appropriate PAC
+ // script configured in DHCP, if any. Can be NULL if the ProxyResolver has
+ // no need for DHCP PAC script fetching.
+ scoped_ptr<DhcpProxyScriptFetcher> dhcp_proxy_script_fetcher_;
+
// Callback for when |init_proxy_resolver_| is done.
CompletionCallbackImpl<ProxyService> init_proxy_resolver_callback_;

Powered by Google App Engine
This is Rietveld 408576698