OLD | NEW |
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 NET_PROXY_PROXY_CONFIG_SERVICE_WIN_H_ | 5 #ifndef NET_PROXY_PROXY_CONFIG_SERVICE_WIN_H_ |
6 #define NET_PROXY_PROXY_CONFIG_SERVICE_WIN_H_ | 6 #define NET_PROXY_PROXY_CONFIG_SERVICE_WIN_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <windows.h> | 9 #include <windows.h> |
10 #include <winhttp.h> | 10 #include <winhttp.h> |
(...skipping 22 matching lines...) Expand all Loading... |
33 // configuration's new value. | 33 // configuration's new value. |
34 // | 34 // |
35 // (2) Do regular polling every 10 seconds during network activity to see if | 35 // (2) Do regular polling every 10 seconds during network activity to see if |
36 // WinHttpGetIEProxyConfigForCurrentUser() returns something different. | 36 // WinHttpGetIEProxyConfigForCurrentUser() returns something different. |
37 // | 37 // |
38 // Ideally strategy (1) should be sufficient to pick up all of the changes. | 38 // Ideally strategy (1) should be sufficient to pick up all of the changes. |
39 // However we still do the regular polling as a precaution in case the | 39 // However we still do the regular polling as a precaution in case the |
40 // implementation details of WinHttpGetIEProxyConfigForCurrentUser() ever | 40 // implementation details of WinHttpGetIEProxyConfigForCurrentUser() ever |
41 // change, or in case we got it wrong (and are not checking all possible | 41 // change, or in case we got it wrong (and are not checking all possible |
42 // registry dependencies). | 42 // registry dependencies). |
43 class NET_TEST ProxyConfigServiceWin | 43 class NET_EXPORT_PRIVATE ProxyConfigServiceWin |
44 : public PollingProxyConfigService, | 44 : public PollingProxyConfigService, |
45 public base::win::ObjectWatcher::Delegate { | 45 public base::win::ObjectWatcher::Delegate { |
46 public: | 46 public: |
47 ProxyConfigServiceWin(); | 47 ProxyConfigServiceWin(); |
48 virtual ~ProxyConfigServiceWin(); | 48 virtual ~ProxyConfigServiceWin(); |
49 | 49 |
50 // Overrides a function from PollingProxyConfigService. | 50 // Overrides a function from PollingProxyConfigService. |
51 virtual void AddObserver(Observer* observer) OVERRIDE; | 51 virtual void AddObserver(Observer* observer) OVERRIDE; |
52 | 52 |
53 private: | 53 private: |
(...skipping 18 matching lines...) Expand all Loading... |
72 static void SetFromIEConfig( | 72 static void SetFromIEConfig( |
73 ProxyConfig* config, | 73 ProxyConfig* config, |
74 const WINHTTP_CURRENT_USER_IE_PROXY_CONFIG& ie_config); | 74 const WINHTTP_CURRENT_USER_IE_PROXY_CONFIG& ie_config); |
75 | 75 |
76 KeyEntryList keys_to_watch_; | 76 KeyEntryList keys_to_watch_; |
77 }; | 77 }; |
78 | 78 |
79 } // namespace net | 79 } // namespace net |
80 | 80 |
81 #endif // NET_PROXY_PROXY_CONFIG_SERVICE_WIN_H_ | 81 #endif // NET_PROXY_PROXY_CONFIG_SERVICE_WIN_H_ |
OLD | NEW |