Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6767)

Unified Diff: chrome/browser/profiles/profile_impl.cc

Issue 18112018: Cleanup the UseSharedProxies preference. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/profiles/profile_impl.cc
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index d363656a52b48c19abf572a11e72ce5f02262042..b4ef81eba150d306b9fba987c452bf10eca4a64b 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -1070,10 +1070,8 @@ void ProfileImpl::InitChromeOSPreferences() {
#endif // defined(OS_CHROMEOS)
PrefProxyConfigTracker* ProfileImpl::GetProxyConfigTracker() {
- if (!pref_proxy_config_tracker_) {
- pref_proxy_config_tracker_.reset(
- ProxyServiceFactory::CreatePrefProxyConfigTracker(GetPrefs()));
- }
+ if (!pref_proxy_config_tracker_)
+ pref_proxy_config_tracker_.reset(CreateProxyConfigTracker());
return pref_proxy_config_tracker_.get();
}
@@ -1162,3 +1160,15 @@ void ProfileImpl::GetCacheParameters(bool is_media_context,
*max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) :
prefs_->GetInteger(prefs::kDiskCacheSize);
}
+
+PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() {
+#if defined(OS_CHROMEOS)
+ if (chromeos::ProfileHelper::IsSigninProfile(this)) {
+ return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState(
+ g_browser_process->local_state());
+ }
+#endif // defined(OS_CHROMEOS)
+ return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile(
+ GetPrefs(), g_browser_process->local_state());
+}
+
« no previous file with comments | « chrome/browser/profiles/profile_impl.h ('k') | chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698