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

Side by Side Diff: components/proxy_config/pref_proxy_config_tracker.h

Issue 1296663003: Componentize proxy code from chrome/browser/net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updating for win p/f Created 5 years, 3 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
« no previous file with comments | « components/proxy_config/DEPS ('k') | components/proxy_config/pref_proxy_config_tracker.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_NET_PREF_PROXY_CONFIG_TRACKER_H_ 5 #ifndef COMPONENTS_PROXY_CONFIG_PREF_PROXY_CONFIG_TRACKER_H_
6 #define CHROME_BROWSER_NET_PREF_PROXY_CONFIG_TRACKER_H_ 6 #define COMPONENTS_PROXY_CONFIG_PREF_PROXY_CONFIG_TRACKER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "components/proxy_config/proxy_config_export.h"
10 11
11 namespace net { 12 namespace net {
12 class ProxyConfigService; 13 class ProxyConfigService;
13 } 14 }
14 15
15 // Interface for a class that tracks proxy preferences. The purpose of the 16 // Interface for a class that tracks proxy preferences. The purpose of the
16 // concrete class is to track changes in the Preferences, to translates the 17 // concrete class is to track changes in the Preferences, to translates the
17 // preferences to net::ProxyConfig and to push the result over to a 18 // preferences to net::ProxyConfig and to push the result over to a
18 // net::ProxyConfigService onto the IO thread. 19 // net::ProxyConfigService onto the IO thread.
19 class PrefProxyConfigTracker { 20 class PROXY_CONFIG_EXPORT PrefProxyConfigTracker {
20 public: 21 public:
21 PrefProxyConfigTracker(); 22 PrefProxyConfigTracker();
22 virtual ~PrefProxyConfigTracker(); 23 virtual ~PrefProxyConfigTracker();
23 24
24 // Creates a net::ProxyConfigService and keeps a pointer to it. After this 25 // Creates a net::ProxyConfigService and keeps a pointer to it. After this
25 // call, this tracker forwards any changes of proxy preferences to the created 26 // call, this tracker forwards any changes of proxy preferences to the created
26 // ProxyConfigService. The returned ProxyConfigService must not be deleted 27 // ProxyConfigService. The returned ProxyConfigService must not be deleted
27 // before DetachFromPrefService was called. Takes ownership of the passed 28 // before DetachFromPrefService was called. Takes ownership of the passed
28 // |base_service|, which can be NULL. This |base_service| provides the proxy 29 // |base_service|, which can be NULL. This |base_service| provides the proxy
29 // settings of the OS (except of ChromeOS). This must be called on the 30 // settings of the OS (except of ChromeOS). This must be called on the
30 // UI thread. 31 // UI thread.
31 virtual scoped_ptr<net::ProxyConfigService> CreateTrackingProxyConfigService( 32 virtual scoped_ptr<net::ProxyConfigService> CreateTrackingProxyConfigService(
32 scoped_ptr<net::ProxyConfigService> base_service) = 0; 33 scoped_ptr<net::ProxyConfigService> base_service) = 0;
33 34
34 // Releases the PrefService passed upon construction and the |base_service| 35 // Releases the PrefService passed upon construction and the |base_service|
35 // passed to CreateTrackingProxyConfigService. This must be called on the UI 36 // passed to CreateTrackingProxyConfigService. This must be called on the UI
36 // thread. 37 // thread.
37 virtual void DetachFromPrefService() = 0; 38 virtual void DetachFromPrefService() = 0;
38 39
39 private: 40 private:
40 DISALLOW_COPY_AND_ASSIGN(PrefProxyConfigTracker); 41 DISALLOW_COPY_AND_ASSIGN(PrefProxyConfigTracker);
41 }; 42 };
42 43
43 #endif // CHROME_BROWSER_NET_PREF_PROXY_CONFIG_TRACKER_H_ 44 #endif // COMPONENTS_PROXY_CONFIG_PREF_PROXY_CONFIG_TRACKER_H_
OLDNEW
« no previous file with comments | « components/proxy_config/DEPS ('k') | components/proxy_config/pref_proxy_config_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698