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

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

Issue 18112018: Cleanup the UseSharedProxies preference. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added a missing member initializer. 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/off_the_record_profile_impl.cc
diff --git a/chrome/browser/profiles/off_the_record_profile_impl.cc b/chrome/browser/profiles/off_the_record_profile_impl.cc
index 64064a727764b9fce689d299a34f36514572d428..f022d06e01070544cfc74d523c15865095cafb91 100644
--- a/chrome/browser/profiles/off_the_record_profile_impl.cc
+++ b/chrome/browser/profiles/off_the_record_profile_impl.cc
@@ -59,6 +59,7 @@
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/preferences.h"
+#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/browser/chromeos/proxy_config_service_impl.h"
#endif
@@ -388,10 +389,8 @@ void OffTheRecordProfileImpl::OnLogin() {
#endif // defined(OS_CHROMEOS)
PrefProxyConfigTracker* OffTheRecordProfileImpl::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();
}
@@ -465,3 +464,15 @@ void OffTheRecordProfileImpl::OnZoomLevelChanged(
return;
}
}
+
+PrefProxyConfigTracker* OffTheRecordProfileImpl::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());
+}
+

Powered by Google App Engine
This is Rietveld 408576698