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

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

Issue 8102019: redesign and reimplement proxy config service and tracker, revise proxy ui on cros (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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
===================================================================
--- chrome/browser/net/pref_proxy_config_service.h (revision 103881)
+++ chrome/browser/net/pref_proxy_config_service.h (working copy)
@@ -49,10 +49,12 @@
void AddObserver(Observer* observer);
void RemoveObserver(Observer* observer);
- // Get the proxy configuration currently defined by preferences. Status is
- // indicated in the return value. Writes the configuration to |config| unless
- // the return value is CONFIG_UNSET, in which case |config| is not touched.
- ConfigState GetProxyConfig(net::ProxyConfig* config);
+ // Get the proxy configuration currently defined by preferences on the IO
+ // and UI threads respectively. Status is indicated in the return value.
+ // Writes the configuration to |config| unless the return value is
+ // CONFIG_UNSET, in which case |config| is not touched.
+ ConfigState IOGetProxyConfig(net::ProxyConfig* config);
+ ConfigState UIGetProxyConfig(net::ProxyConfig* config);
// Notifies the tracker that the pref service passed upon construction is
// about to go away. This must be called from the UI thread.
@@ -84,13 +86,20 @@
static bool PrefConfigToNetConfig(const ProxyConfigDictionary& proxy_dict,
net::ProxyConfig* config);
+ // Configuration as defined by prefs. Only to be accessed from the UI thread.
+ net::ProxyConfig ui_pref_config_;
+
+ // Tracks configuration state. |ui_pref_config_| is valid only if
+ // |ui_config_state_| is not CONFIG_UNSET.
+ ConfigState ui_config_state_;
+
// Configuration as defined by prefs. Only to be accessed from the IO thread
// (except for construction).
- net::ProxyConfig pref_config_;
+ net::ProxyConfig io_pref_config_;
- // Tracks configuration state. |pref_config_| is valid only if |config_state_|
- // is not CONFIG_UNSET.
- ConfigState config_state_;
+ // Tracks configuration state. |io_pref_config_| is valid only if
+ // |io_config_state_| is not CONFIG_UNSET.
+ ConfigState io_config_state_;
// List of observers, accessed exclusively from the IO thread.
ObserverList<Observer, true> observers_;

Powered by Google App Engine
This is Rietveld 408576698