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

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: 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
« no previous file with comments | « chrome/browser/profiles/off_the_record_profile_impl.h ('k') | chrome/browser/profiles/profile_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cf95b5359752f00a5384c2b125dc3ae675fa97bf..931ed9acf3917f6657effe6c0e7da4909e0c58a2 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
@@ -397,10 +398,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();
}
@@ -474,3 +473,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());
+}
+
« no previous file with comments | « chrome/browser/profiles/off_the_record_profile_impl.h ('k') | chrome/browser/profiles/profile_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698