Index: components/proxy_config/pref_proxy_config_tracker_impl.h |
diff --git a/components/proxy_config/pref_proxy_config_tracker_impl.h b/components/proxy_config/pref_proxy_config_tracker_impl.h |
index 850b241544b220c0b8e5c89b4bcc60cc744235ff..b86fb3271f057dfc5d21ed944ebe880375738b67 100644 |
--- a/components/proxy_config/pref_proxy_config_tracker_impl.h |
+++ b/components/proxy_config/pref_proxy_config_tracker_impl.h |
@@ -24,10 +24,6 @@ namespace base { |
class SingleThreadTaskRunner; |
} |
-namespace user_prefs { |
-class PrefRegistrySyncable; |
-} |
- |
// A net::ProxyConfigService implementation that applies preference proxy |
// settings (pushed from PrefProxyConfigTrackerImpl) as overrides to the proxy |
// configuration determined by a baseline delegate ProxyConfigService on |
@@ -126,7 +122,7 @@ class PROXY_CONFIG_EXPORT PrefProxyConfigTrackerImpl |
// Registers the proxy preferences. These are actually registered |
// the same way in local state and in user prefs. |
static void RegisterPrefs(PrefRegistrySimple* registry); |
- static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
+ static void RegisterProfilePrefs(PrefRegistrySimple* registry); |
// Creates a proxy configuration from proxy-related preferences of |
// |pref_service|. Configuration is stored in |config|, return value indicates |
@@ -143,6 +139,8 @@ class PROXY_CONFIG_EXPORT PrefProxyConfigTrackerImpl |
// Called when there's a change in prefs proxy config. |
// Subclasses can extend it for changes in other sources of proxy config. |
+ // Checks new config against old config, and if there was no change, does |
+ // nothing. |
virtual void OnProxyConfigChanged(ProxyPrefs::ConfigState config_state, |
const net::ProxyConfig& config); |
@@ -153,7 +151,7 @@ class PROXY_CONFIG_EXPORT PrefProxyConfigTrackerImpl |
private: |
// Tracks configuration state. |pref_config_| is valid only if |config_state_| |
// is not CONFIG_UNSET. |
- ProxyPrefs::ConfigState config_state_; |
+ ProxyPrefs::ConfigState pref_config_state_; |
// Configuration as defined by prefs. |
net::ProxyConfig pref_config_; |
@@ -162,6 +160,13 @@ class PROXY_CONFIG_EXPORT PrefProxyConfigTrackerImpl |
ProxyConfigServiceImpl* proxy_config_service_impl_; // Weak ptr. |
PrefChangeRegistrar proxy_prefs_; |
+ // State of |active_config_|. |active_config_| is only valid if |
+ // |active_config_state_| is not ProxyPrefs::CONFIG_UNSET. |
+ ProxyPrefs::ConfigState active_config_state_; |
+ |
+ // Active proxy configuration, last received from OnProxyConfigChanged. |
+ net::ProxyConfig active_config_; |
+ |
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; |
base::ThreadChecker thread_checker_; |