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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 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_CHROMEOS_PROXY_CONFIG_SERVICE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_PROXY_CONFIG_SERVICE_H_
6 #define CHROME_BROWSER_CHROMEOS_PROXY_CONFIG_SERVICE_H_ 6 #define CHROME_BROWSER_CHROMEOS_PROXY_CONFIG_SERVICE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/chromeos/proxy_config_service_impl.h" 9 #include "chrome/browser/chromeos/proxy_config_service_impl.h"
10 10
11 class PrefProxyConfigTracker;
12
11 namespace chromeos { 13 namespace chromeos {
12 14
13 // Wrapper class for the RefCountedThreadSafe chromeos::ProxyConfigServiceImpl 15 // Wrapper class for the RefCountedThreadSafe chromeos::ProxyConfigServiceImpl
14 // that forwards net::ProxyConfigService interface to the actual implementation, 16 // that forwards net::ProxyConfigService interface and extra functionalities
17 // to the actual implementation,
15 // instantiated in ProfileIOData::CreateProxyConfigService. 18 // instantiated in ProfileIOData::CreateProxyConfigService.
16 class ProxyConfigService : public net::ProxyConfigService { 19 class ProxyConfigService : public net::ProxyConfigService,
20 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.
17 public: 21 public:
18 explicit ProxyConfigService( 22 ProxyConfigService(const scoped_refptr<ProxyConfigServiceImpl>& impl,
19 const scoped_refptr<ProxyConfigServiceImpl>& impl); 23 PrefProxyConfigTracker* pref_config_tracker);
20 virtual ~ProxyConfigService(); 24 virtual ~ProxyConfigService();
21 25
22 // ProxyConfigService methods. Called from IO thread. 26 // ProxyConfigService methods. Called from IO thread.
23 virtual void AddObserver(Observer* observer); 27 virtual void AddObserver(net::ProxyConfigService::Observer* observer);
24 virtual void RemoveObserver(Observer* observer); 28 virtual void RemoveObserver(net::ProxyConfigService::Observer* observer);
25 virtual ConfigAvailability GetLatestProxyConfig(net::ProxyConfig* config); 29 virtual ConfigAvailability GetLatestProxyConfig(net::ProxyConfig* config);
26 30
31 // PrefProxyConfigTracker::Observer implementation.
32 void OnPrefProxyConfigChanged();
33
27 private: 34 private:
35 void RegisterTracker();
36
28 scoped_refptr<ProxyConfigServiceImpl> impl_; 37 scoped_refptr<ProxyConfigServiceImpl> impl_;
29 38
39 scoped_refptr<PrefProxyConfigTracker> pref_config_tracker_;
40
41 // Indicates if we've registered for pref_config_tracker_.
42 bool registered_tracker_;
43
30 DISALLOW_COPY_AND_ASSIGN(ProxyConfigService); 44 DISALLOW_COPY_AND_ASSIGN(ProxyConfigService);
31 }; 45 };
32 46
33 } // namespace chromeos 47 } // namespace chromeos
34 48
35 #endif // CHROME_BROWSER_CHROMEOS_PROXY_CONFIG_SERVICE_H_ 49 #endif // CHROME_BROWSER_CHROMEOS_PROXY_CONFIG_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698