| OLD | NEW |
| 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 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> |
| 11 | 11 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 void StartWatchingRegistryForChanges(); | 57 void StartWatchingRegistryForChanges(); |
| 58 | 58 |
| 59 // Creates a new KeyEntry and appends it to |keys_to_watch_|. If the key | 59 // Creates a new KeyEntry and appends it to |keys_to_watch_|. If the key |
| 60 // fails to be created, it is not appended to the list and we return false. | 60 // fails to be created, it is not appended to the list and we return false. |
| 61 bool AddKeyToWatchList(HKEY rootkey, const wchar_t* subkey); | 61 bool AddKeyToWatchList(HKEY rootkey, const wchar_t* subkey); |
| 62 | 62 |
| 63 // ObjectWatcher::Delegate methods: | 63 // ObjectWatcher::Delegate methods: |
| 64 // This is called whenever one of the registry keys we are watching change. | 64 // This is called whenever one of the registry keys we are watching change. |
| 65 virtual void OnObjectSignaled(HANDLE object); | 65 virtual void OnObjectSignaled(HANDLE object); |
| 66 | 66 |
| 67 static void GetCurrentProxyConfig(ProxyConfig* config); | 67 static ConfigAvailability GetCurrentProxyConfig(ProxyConfig* config); |
| 68 | 68 |
| 69 // Set |config| using the proxy configuration values of |ie_config|. | 69 // Set |config| using the proxy configuration values of |ie_config|. |
| 70 static void SetFromIEConfig( | 70 static void SetFromIEConfig( |
| 71 ProxyConfig* config, | 71 ProxyConfig* config, |
| 72 const WINHTTP_CURRENT_USER_IE_PROXY_CONFIG& ie_config); | 72 const WINHTTP_CURRENT_USER_IE_PROXY_CONFIG& ie_config); |
| 73 | 73 |
| 74 KeyEntryList keys_to_watch_; | 74 KeyEntryList keys_to_watch_; |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 } // namespace net | 77 } // namespace net |
| 78 | 78 |
| 79 #endif // NET_PROXY_PROXY_CONFIG_SERVICE_WIN_H_ | 79 #endif // NET_PROXY_PROXY_CONFIG_SERVICE_WIN_H_ |
| OLD | NEW |