diff options
author | pneubeck@chromium.org <pneubeck@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-07 16:06:13 +0000 |
---|---|---|
committer | pneubeck@chromium.org <pneubeck@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-07 16:06:13 +0000 |
commit | 1ee36bccbc029d184c63bb0cc924715c30663941 (patch) | |
tree | 837ac4c769e8b526c0bbc3cf712bdd114302a351 /chrome/browser/chromeos/proxy_cros_settings_parser.cc | |
parent | fed609fe1e0f3952503412d26b25c556eb578872 (diff) | |
download | chromium_src-1ee36bccbc029d184c63bb0cc924715c30663941.zip chromium_src-1ee36bccbc029d184c63bb0cc924715c30663941.tar.gz chromium_src-1ee36bccbc029d184c63bb0cc924715c30663941.tar.bz2 |
Fix ownership of proxy UI related state.
- stores proxy UI related state in the CoreChromeOSOptionsHandler, i.e. per open settings page.
- removes any dependency of ProxyConfigServiceImpl on proxy UI.
BUG=142370, 234982
Review URL: https://chromiumcodereview.appspot.com/15847003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204853 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/proxy_cros_settings_parser.cc')
-rw-r--r-- | chrome/browser/chromeos/proxy_cros_settings_parser.cc | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/chrome/browser/chromeos/proxy_cros_settings_parser.cc b/chrome/browser/chromeos/proxy_cros_settings_parser.cc index a4a034b..41b99b8 100644 --- a/chrome/browser/chromeos/proxy_cros_settings_parser.cc +++ b/chrome/browser/chromeos/proxy_cros_settings_parser.cc @@ -6,10 +6,8 @@ #include "base/string_util.h" #include "base/values.h" -#include "chrome/browser/chromeos/proxy_config_service_impl.h" #include "chrome/browser/chromeos/ui_proxy_config.h" #include "chrome/browser/chromeos/ui_proxy_config_service.h" -#include "chrome/browser/profiles/profile.h" namespace chromeos { @@ -117,16 +115,14 @@ bool IsProxyPref(const std::string& path) { return StartsWithASCII(path, kProxyPrefsPrefix, true); } -void SetProxyPrefValue(Profile* profile, - const std::string& path, - const base::Value* in_value) { +void SetProxyPrefValue(const std::string& path, + const base::Value* in_value, + UIProxyConfigService* config_service) { if (!in_value) { NOTREACHED(); return; } - UIProxyConfigService* config_service = - &profile->GetProxyConfigTracker()->GetUIService(); // Retrieve proxy config. UIProxyConfig config; config_service->GetProxyConfig(&config); @@ -288,13 +284,11 @@ void SetProxyPrefValue(Profile* profile, config_service->SetProxyConfig(config); } -bool GetProxyPrefValue(Profile* profile, +bool GetProxyPrefValue(const UIProxyConfigService& config_service, const std::string& path, base::Value** out_value) { std::string controlled_by; base::Value* data = NULL; - UIProxyConfigService& config_service = - profile->GetProxyConfigTracker()->GetUIService(); UIProxyConfig config; config_service.GetProxyConfig(&config); |