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

Unified Diff: chrome/browser/chromeos/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/chromeos/proxy_config_service.h
===================================================================
--- chrome/browser/chromeos/proxy_config_service.h (revision 103881)
+++ chrome/browser/chromeos/proxy_config_service.h (working copy)
@@ -8,25 +8,39 @@
#include "chrome/browser/chromeos/proxy_config_service_impl.h"
+class PrefProxyConfigTracker;
+
namespace chromeos {
// Wrapper class for the RefCountedThreadSafe chromeos::ProxyConfigServiceImpl
-// that forwards net::ProxyConfigService interface to the actual implementation,
+// that forwards net::ProxyConfigService interface and extra functionalities
+// to the actual implementation,
// instantiated in ProfileIOData::CreateProxyConfigService.
-class ProxyConfigService : public net::ProxyConfigService {
+class ProxyConfigService : public net::ProxyConfigService,
+ public PrefProxyConfigTracker::Observer {
Mattias Nissler (ping if slow) 2011/10/07 13:32:10 As I mentioned in the email: Why do we handle the
kuan 2011/10/18 16:25:35 Done.
public:
- explicit ProxyConfigService(
- const scoped_refptr<ProxyConfigServiceImpl>& impl);
+ ProxyConfigService(const scoped_refptr<ProxyConfigServiceImpl>& impl,
+ PrefProxyConfigTracker* pref_config_tracker);
virtual ~ProxyConfigService();
// ProxyConfigService methods. Called from IO thread.
- virtual void AddObserver(Observer* observer);
- virtual void RemoveObserver(Observer* observer);
+ virtual void AddObserver(net::ProxyConfigService::Observer* observer);
+ virtual void RemoveObserver(net::ProxyConfigService::Observer* observer);
virtual ConfigAvailability GetLatestProxyConfig(net::ProxyConfig* config);
+ // PrefProxyConfigTracker::Observer implementation.
+ void OnPrefProxyConfigChanged();
+
private:
+ void RegisterTracker();
+
scoped_refptr<ProxyConfigServiceImpl> impl_;
+ scoped_refptr<PrefProxyConfigTracker> pref_config_tracker_;
+
+ // Indicates if we've registered for pref_config_tracker_.
+ bool registered_tracker_;
+
DISALLOW_COPY_AND_ASSIGN(ProxyConfigService);
};

Powered by Google App Engine
This is Rietveld 408576698