summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/proxy_config_service_impl.h
diff options
context:
space:
mode:
authorpastarmovj@chromium.org <pastarmovj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-14 15:26:32 +0000
committerpastarmovj@chromium.org <pastarmovj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-14 15:26:32 +0000
commit2425da9095be4777e6f101c4dbfc51ec59103c87 (patch)
tree0ce90f7bb752b2fa759d3a1b81e5ab9fb14be658 /chrome/browser/chromeos/proxy_config_service_impl.h
parent4ae8796fddfb6c2564504de30ef50906136bd76c (diff)
downloadchromium_src-2425da9095be4777e6f101c4dbfc51ec59103c87.zip
chromium_src-2425da9095be4777e6f101c4dbfc51ec59103c87.tar.gz
chromium_src-2425da9095be4777e6f101c4dbfc51ec59103c87.tar.bz2
Refactor proxy handling for ChromeOS to not go through the CrosSettings interface.
The ProxyCrosSettingsProvider was not a real SignedSettings handler since the network manager was introduced and was only used to parse the data for the UI. However this does not go well with the unification of the SignedSettings handling and belongs to the presentation layer. Therefore we extract the parsing functionality in a helper class and move some of the logic up the UI handling layer. BUG=chromium-os:14054 TEST=Proxy UI should still be working (automation tests). Review URL: http://codereview.chromium.org/8467012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109886 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.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/chrome/browser/chromeos/proxy_config_service_impl.h b/chrome/browser/chromeos/proxy_config_service_impl.h
index dc25618..b059080 100644
--- a/chrome/browser/chromeos/proxy_config_service_impl.h
+++ b/chrome/browser/chromeos/proxy_config_service_impl.h
@@ -182,6 +182,15 @@ class ProxyConfigServiceImpl
// Only valid for MODE_SINGLE_PROXY or MODE_PROXY_PER_SCHEME.
bool UISetProxyConfigBypassRules(const net::ProxyBypassRules& bypass_rules);
+ // Add/Remove callback functions for notification when network to be viewed is
+ // changed by the UI.
+ void AddNotificationCallback(base::Closure callback);
+ void RemoveNotificationCallback(base::Closure callback);
+
+ // PrefProxyConfigTrackerImpl implementation.
+ virtual void OnProxyConfigChanged(ProxyPrefs::ConfigState config_state,
+ const net::ProxyConfig& config) OVERRIDE;
+
// Implementation for SignedSettings::Delegate
virtual void OnSettingsOpCompleted(SignedSettings::ReturnCode code,
std::string value) OVERRIDE;
@@ -193,10 +202,6 @@ class ProxyConfigServiceImpl
virtual void OnNetworkChanged(NetworkLibrary* cros,
const Network* network) OVERRIDE;
- // PrefProxyConfigTrackerImpl implementation.
- virtual void OnProxyConfigChanged(ProxyPrefs::ConfigState config_state,
- const net::ProxyConfig& config) OVERRIDE;
-
// Register UseShardProxies preference.
static void RegisterPrefs(PrefService* pref_service);
@@ -293,6 +298,10 @@ class ProxyConfigServiceImpl
// Operation to retrieve proxy setting from device.
scoped_refptr<SignedSettings> retrieve_property_op_;
+ // Callbacks for notification when network to be viewed has been changed from
+ // the UI.
+ std::vector<base::Closure> callbacks_;
+
DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceImpl);
};