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-22 11:52:24 +0000
committerpneubeck@chromium.org <pneubeck@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-22 11:52:24 +0000
commit1faaab7bcf1aadc661c12316fef434e3e2c30c6a (patch)
tree6a9df5c14a52616ab193a2d1ee36b730d9fda6fe /chrome/browser/chromeos/proxy_config_service_impl.h
parentc70d54d8f5527ada49cee016cd363f2367158648 (diff)
downloadchromium_src-1faaab7bcf1aadc661c12316fef434e3e2c30c6a.zip
chromium_src-1faaab7bcf1aadc661c12316fef434e3e2c30c6a.tar.gz
chromium_src-1faaab7bcf1aadc661c12316fef434e3e2c30c6a.tar.bz2
ChromeOS: Add a per user and a local state network preference.
- Adds a network preference kOpenNetworkProperties to user prefs. - Adds a network preference kDeviceOpenNetworkProperties to local state. - Both are lists of NetworkConfigurations according to the ONC spec. - For now, only policies are written to these prefs. - User settings continue to be stored in Shill for now. A follow up commit will change that too. BUG=258835 TBR=mpcomplete@chromium.org (trivial change in chrome_direct_setting_api.h) Review URL: https://chromiumcodereview.appspot.com/18348012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212872 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.h23
1 files changed, 12 insertions, 11 deletions
diff --git a/chrome/browser/chromeos/proxy_config_service_impl.h b/chrome/browser/chromeos/proxy_config_service_impl.h
index de8f493..1037a05 100644
--- a/chrome/browser/chromeos/proxy_config_service_impl.h
+++ b/chrome/browser/chromeos/proxy_config_service_impl.h
@@ -9,17 +9,11 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
-#include "base/prefs/pref_member.h"
+#include "base/prefs/pref_change_registrar.h"
#include "chrome/browser/net/pref_proxy_config_tracker_impl.h"
#include "chromeos/network/network_state_handler_observer.h"
#include "chromeos/network/onc/onc_constants.h"
-class PrefRegistrySimple;
-
-namespace user_prefs {
-class PrefRegistrySyncable;
-}
-
namespace chromeos {
class NetworkState;
@@ -70,8 +64,8 @@ class ProxyConfigServiceImpl : public PrefProxyConfigTrackerImpl,
onc::ONCSource onc_source);
private:
- // Called when the kUseSharedProxies preference changes.
- void OnUseSharedProxiesChanged();
+ // Called when any proxy preference changes.
+ void OnProxyPrefChanged();
// Determines effective proxy config based on prefs from config tracker, the
// current default network and if user is using shared proxies. The effective
@@ -86,13 +80,20 @@ class ProxyConfigServiceImpl : public PrefProxyConfigTrackerImpl,
// Active proxy configuration, which could be from prefs or network.
net::ProxyConfig active_config_;
- // Track changes in UseSharedProxies user preference.
- BooleanPrefMember use_shared_proxies_;
+ // Track changes in profile preferences: UseSharedProxies and
+ // OpenNetworkConfiguration.
+ PrefChangeRegistrar profile_pref_registrar_;
+
+ // Track changes in local state preferences: DeviceOpenNetworkConfiguration.
+ PrefChangeRegistrar local_state_pref_registrar_;
// Not owned. NULL if tracking only local state prefs (e.g. in the system
// request context or sign-in screen).
PrefService* profile_prefs_;
+ // Not owned.
+ PrefService* local_state_prefs_;
+
base::WeakPtrFactory<ProxyConfigServiceImpl> pointer_factory_;
DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceImpl);