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

Unified Diff: chrome/browser/net/pref_proxy_config_service.h

Issue 6549007: Make CrOS proxy configuration write prefs directly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove default request context proxy config service patch. Created 9 years, 10 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/pref_proxy_config_service.h
diff --git a/chrome/browser/net/pref_proxy_config_service.h b/chrome/browser/net/pref_proxy_config_service.h
index 661a250733ac89761e916a7a0448bf1712b2edca..b5782b05321768ea3e0a4b8b5488e218f6320ce7 100644
--- a/chrome/browser/net/pref_proxy_config_service.h
+++ b/chrome/browser/net/pref_proxy_config_service.h
@@ -32,7 +32,14 @@ class PrefProxyConfigTracker
virtual void OnPrefProxyConfigChanged() = 0;
};
- explicit PrefProxyConfigTracker(PrefService* pref_service);
+ // Initialize a tracker that will retrieve the configuration from
+ // |pref_service|. |fallback_pref_service| may be NULL. If specfied, it is
+ // consulted for a user pref (and only that!) if the user preference is
+ // missing in the main |pref_service|. This allows us to default the user
+ // preference to the |local_state| preference if there is no user preference
+ // for the profile.
+ PrefProxyConfigTracker(PrefService* pref_service,
+ PrefService* fallback_pref_service);
virtual ~PrefProxyConfigTracker();
// Observer manipulation is only valid on the IO thread.
@@ -81,6 +88,11 @@ class PrefProxyConfigTracker
PrefService* pref_service_;
scoped_ptr<PrefSetObserver> proxy_prefs_observer_;
+ // A fallback PrefSerice that is checked for user preferences if
kuan 2011/02/22 22:20:25 nit: typo: PrefService
Mattias Nissler (ping if slow) 2011/03/01 15:19:20 Done.
+ // |pref_service| doesn't have any user preference.
+ PrefService* fallback_pref_service_;
+ scoped_ptr<PrefSetObserver> fallback_proxy_prefs_observer_;
+
DISALLOW_COPY_AND_ASSIGN(PrefProxyConfigTracker);
};

Powered by Google App Engine
This is Rietveld 408576698