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

Unified Diff: net/proxy/proxy_config_service_win.h

Issue 652903005: Revert of Remove raw handles from base::win::RegKey (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/dns/dns_config_service_win.cc ('k') | net/proxy/proxy_config_service_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_config_service_win.h
diff --git a/net/proxy/proxy_config_service_win.h b/net/proxy/proxy_config_service_win.h
index 52c389574d4056862aedb7d3543e594be45b77be..62f1f120c74c265f40a64b3ed98aedb522751bf1 100644
--- a/net/proxy/proxy_config_service_win.h
+++ b/net/proxy/proxy_config_service_win.h
@@ -12,13 +12,8 @@
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
+#include "base/win/object_watcher.h"
#include "net/proxy/polling_proxy_config_service.h"
-
-namespace base {
-namespace win {
-class RegKey;
-}
-} // namespace base.
namespace net {
@@ -45,7 +40,8 @@
// change, or in case we got it wrong (and are not checking all possible
// registry dependencies).
class NET_EXPORT_PRIVATE ProxyConfigServiceWin
- : public PollingProxyConfigService {
+ : public PollingProxyConfigService,
+ public base::win::ObjectWatcher::Delegate {
public:
ProxyConfigServiceWin();
virtual ~ProxyConfigServiceWin();
@@ -55,17 +51,19 @@
private:
FRIEND_TEST_ALL_PREFIXES(ProxyConfigServiceWinTest, SetFromIEConfig);
- typedef std::vector<base::win::RegKey*> RegKeyList;
+ class KeyEntry;
+ typedef std::vector<KeyEntry*> KeyEntryList;
// Registers change observers on the registry keys relating to proxy settings.
void StartWatchingRegistryForChanges();
- // Creates a new key and appends it to |keys_to_watch_|. If the key fails to
- // be created, it is not appended to the list and we return false.
+ // Creates a new KeyEntry and appends it to |keys_to_watch_|. If the key
+ // fails to be created, it is not appended to the list and we return false.
bool AddKeyToWatchList(HKEY rootkey, const wchar_t* subkey);
+ // ObjectWatcher::Delegate methods:
// This is called whenever one of the registry keys we are watching change.
- void OnObjectSignaled(base::win::RegKey* key);
+ virtual void OnObjectSignaled(HANDLE object) override;
static void GetCurrentProxyConfig(ProxyConfig* config);
@@ -74,7 +72,7 @@
ProxyConfig* config,
const WINHTTP_CURRENT_USER_IE_PROXY_CONFIG& ie_config);
- RegKeyList keys_to_watch_;
+ KeyEntryList keys_to_watch_;
};
} // namespace net
« no previous file with comments | « net/dns/dns_config_service_win.cc ('k') | net/proxy/proxy_config_service_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698