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

Unified Diff: chrome/browser/net/proxy_service_factory.cc

Issue 18112018: Cleanup the UseSharedProxies preference. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added missing include. 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/net/proxy_service_factory.cc
diff --git a/chrome/browser/net/proxy_service_factory.cc b/chrome/browser/net/proxy_service_factory.cc
index 9d30b1e3f6e9e4e15802de32530d73cbbe443666..230c750b8192ed17cbf9dc568301c15188ee50ed 100644
--- a/chrome/browser/net/proxy_service_factory.cc
+++ b/chrome/browser/net/proxy_service_factory.cc
@@ -10,6 +10,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/io_thread.h"
#include "chrome/browser/net/pref_proxy_config_tracker.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_switches.h"
#include "content/public/browser/browser_thread.h"
#include "net/base/net_log.h"
@@ -21,6 +22,7 @@
#include "net/url_request/url_request_context.h"
#if defined(OS_CHROMEOS)
+#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/browser/chromeos/proxy_config_service_impl.h"
#endif // defined(OS_CHROMEOS)
@@ -57,17 +59,30 @@ ChromeProxyConfigService* ProxyServiceFactory::CreateProxyConfigService() {
#if defined(OS_CHROMEOS)
// static
chromeos::ProxyConfigServiceImpl*
- ProxyServiceFactory::CreatePrefProxyConfigTracker(
- PrefService* pref_service) {
- return new chromeos::ProxyConfigServiceImpl(pref_service);
+ProxyServiceFactory::CreatePrefProxyConfigTracker(Profile* profile) {
+ return new chromeos::ProxyConfigServiceImpl(
+ chromeos::ProfileHelper::IsSigninProfile(profile),
+ profile->GetPrefs(),
+ g_browser_process->local_state());
}
#else
// static
PrefProxyConfigTrackerImpl* ProxyServiceFactory::CreatePrefProxyConfigTracker(
+ Profile* profile) {
+ return new PrefProxyConfigTrackerImpl(profile->GetPrefs());
+}
+#endif // defined(OS_CHROMEOS)
+
+// static
+PrefProxyConfigTrackerImpl*
+ProxyServiceFactory::CreatePrefProxyConfigTrackerForLocalState(
PrefService* pref_service) {
+#if defined(OS_CHROMEOS)
+ return new chromeos::ProxyConfigServiceImpl(false, NULL, pref_service);
+#else
return new PrefProxyConfigTrackerImpl(pref_service);
-}
#endif // defined(OS_CHROMEOS)
+}
// static
net::ProxyService* ProxyServiceFactory::CreateProxyService(

Powered by Google App Engine
This is Rietveld 408576698