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

Side by Side Diff: chrome/browser/net/pref_proxy_config_service.h

Issue 6542013: Get rid of browser_prefs::RegisterAllPrefs() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix metrics_log_unittest.cc 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_NET_PREF_PROXY_CONFIG_SERVICE_H_ 5 #ifndef CHROME_BROWSER_NET_PREF_PROXY_CONFIG_SERVICE_H_
6 #define CHROME_BROWSER_NET_PREF_PROXY_CONFIG_SERVICE_H_ 6 #define CHROME_BROWSER_NET_PREF_PROXY_CONFIG_SERVICE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
11 #include "base/ref_counted.h" 11 #include "base/ref_counted.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 PrefProxyConfigService(PrefProxyConfigTracker* tracker, 96 PrefProxyConfigService(PrefProxyConfigTracker* tracker,
97 net::ProxyConfigService* base_service); 97 net::ProxyConfigService* base_service);
98 virtual ~PrefProxyConfigService(); 98 virtual ~PrefProxyConfigService();
99 99
100 // ProxyConfigService implementation: 100 // ProxyConfigService implementation:
101 virtual void AddObserver(net::ProxyConfigService::Observer* observer); 101 virtual void AddObserver(net::ProxyConfigService::Observer* observer);
102 virtual void RemoveObserver(net::ProxyConfigService::Observer* observer); 102 virtual void RemoveObserver(net::ProxyConfigService::Observer* observer);
103 virtual bool GetLatestProxyConfig(net::ProxyConfig* config); 103 virtual bool GetLatestProxyConfig(net::ProxyConfig* config);
104 virtual void OnLazyPoll(); 104 virtual void OnLazyPoll();
105 105
106 static void RegisterUserPrefs(PrefService* user_prefs); 106 static void RegisterPrefs(PrefService* user_prefs);
107 107
108 private: 108 private:
109 // ProxyConfigService::Observer implementation: 109 // ProxyConfigService::Observer implementation:
110 virtual void OnProxyConfigChanged(const net::ProxyConfig& config); 110 virtual void OnProxyConfigChanged(const net::ProxyConfig& config);
111 111
112 // PrefProxyConfigTracker::Observer implementation: 112 // PrefProxyConfigTracker::Observer implementation:
113 virtual void OnPrefProxyConfigChanged(); 113 virtual void OnPrefProxyConfigChanged();
114 114
115 // Makes sure that the observer registrations with the base service and the 115 // Makes sure that the observer registrations with the base service and the
116 // tracker object are set up. 116 // tracker object are set up.
117 void RegisterObservers(); 117 void RegisterObservers();
118 118
119 scoped_ptr<net::ProxyConfigService> base_service_; 119 scoped_ptr<net::ProxyConfigService> base_service_;
120 ObserverList<net::ProxyConfigService::Observer, true> observers_; 120 ObserverList<net::ProxyConfigService::Observer, true> observers_;
121 scoped_refptr<PrefProxyConfigTracker> pref_config_tracker_; 121 scoped_refptr<PrefProxyConfigTracker> pref_config_tracker_;
122 122
123 // Indicates whether the base service and tracker registrations are done. 123 // Indicates whether the base service and tracker registrations are done.
124 bool registered_observers_; 124 bool registered_observers_;
125 125
126 DISALLOW_COPY_AND_ASSIGN(PrefProxyConfigService); 126 DISALLOW_COPY_AND_ASSIGN(PrefProxyConfigService);
127 }; 127 };
128 128
129 #endif // CHROME_BROWSER_NET_PREF_PROXY_CONFIG_SERVICE_H_ 129 #endif // CHROME_BROWSER_NET_PREF_PROXY_CONFIG_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698