summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/proxy_config_service_impl.h
diff options
context:
space:
mode:
authorpneubeck@chromium.org <pneubeck@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-17 05:25:42 +0000
committerpneubeck@chromium.org <pneubeck@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-17 05:25:42 +0000
commite2930d090607fd6008caca45121d0aba3ed65b46 (patch)
tree5a701f6267cc8e3b6ef1f0e03a22cad8b84c764c /chrome/browser/chromeos/proxy_config_service_impl.h
parentcb89a48ff5746ac31b9eda9b57cf05ddeb439dad (diff)
downloadchromium_src-e2930d090607fd6008caca45121d0aba3ed65b46.zip
chromium_src-e2930d090607fd6008caca45121d0aba3ed65b46.tar.gz
chromium_src-e2930d090607fd6008caca45121d0aba3ed65b46.tar.bz2
Cleanup the UseSharedProxies preference.
- remove the UserSharedProxies pref from local state - fix the default value of the pref in the profile pref service - make the conditionals, when to use or ignore proxy settings, more explicit and clearer. BUG=258835 TEST=Manually checked all combinations of {DevicePolicy, UserPolicy, SharedNetwork, NotSharedNetwork} x {before, after login} x {enabled, disabled UseSharedProxies} for proxies of the system context, signin profile and user's profile. I checked the proxies by looking at the vlogs and the UI (like net-internals and settings page). I did not test the actual network connectivity of each context. TBR=battre@chromium.org, nkostylev@chromium.org Review URL: https://codereview.chromium.org/18112018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211954 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/proxy_config_service_impl.h')
-rw-r--r--chrome/browser/chromeos/proxy_config_service_impl.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/chrome/browser/chromeos/proxy_config_service_impl.h b/chrome/browser/chromeos/proxy_config_service_impl.h
index c45c4b7..de8f493 100644
--- a/chrome/browser/chromeos/proxy_config_service_impl.h
+++ b/chrome/browser/chromeos/proxy_config_service_impl.h
@@ -38,14 +38,18 @@ class ProxyConfigServiceImpl : public PrefProxyConfigTrackerImpl,
public:
// ProxyConfigServiceImpl is created in ProxyServiceFactory::
// CreatePrefProxyConfigTrackerImpl via Profile::GetProxyConfigTracker() for
- // profile or IOThread constructor for local state and is owned by the
+ // profile or via IOThread constructor for local state and is owned by the
// respective classes.
//
- // The new modified proxy config, together with proxy from prefs if available,
- // are used to determine the effective proxy config, which is then pushed
- // through PrefProxyConfigTrackerImpl to ChromeProxyConfigService to the
+ // The user's proxy config, proxy policies and proxy from prefs, are used to
+ // determine the effective proxy config, which is then pushed through
+ // PrefProxyConfigTrackerImpl to ChromeProxyConfigService to the
// network stack.
- explicit ProxyConfigServiceImpl(PrefService* pref_service);
+ //
+ // |profile_prefs| can be NULL if this object should only track prefs from
+ // local state (e.g., for system request context or sigin-in screen).
+ explicit ProxyConfigServiceImpl(PrefService* profile_prefs,
+ PrefService* local_state_prefs);
virtual ~ProxyConfigServiceImpl();
// PrefProxyConfigTrackerImpl implementation.
@@ -55,21 +59,13 @@ class ProxyConfigServiceImpl : public PrefProxyConfigTrackerImpl,
// NetworkStateHandlerObserver implementation.
virtual void DefaultNetworkChanged(const NetworkState* network) OVERRIDE;
- // Register UseShardProxies preference.
- static void RegisterPrefs(PrefRegistrySimple* registry);
- static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
-
protected:
friend class UIProxyConfigService;
- // Returns value of UseSharedProxies preference if it's not default, else
- // returns false if user is logged in and true otherwise.
- static bool GetUseSharedProxies(const PrefService* pref_service);
-
- // Returns true if proxy is to be ignored for this profile and |onc_source|,
- // e.g. this happens if the network is shared and use-shared-proxies is turned
- // off.
- static bool IgnoreProxy(const PrefService* pref_service,
+ // Returns true if proxy is to be ignored for this network profile and
+ // |onc_source|, e.g. this happens if the network is shared and
+ // use-shared-proxies is turned off. |profile_prefs| may be NULL.
+ static bool IgnoreProxy(const PrefService* profile_prefs,
const std::string network_profile_path,
onc::ONCSource onc_source);
@@ -93,6 +89,10 @@ class ProxyConfigServiceImpl : public PrefProxyConfigTrackerImpl,
// Track changes in UseSharedProxies user preference.
BooleanPrefMember use_shared_proxies_;
+ // Not owned. NULL if tracking only local state prefs (e.g. in the system
+ // request context or sign-in screen).
+ PrefService* profile_prefs_;
+
base::WeakPtrFactory<ProxyConfigServiceImpl> pointer_factory_;
DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceImpl);