Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 BASE_WIN_REGISTRY_H_ | 5 #ifndef BASE_WIN_REGISTRY_H_ |
| 6 #define BASE_WIN_REGISTRY_H_ | 6 #define BASE_WIN_REGISTRY_H_ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 125 | 125 |
| 126 // Will automatically be called by destructor if not manually called | 126 // Will automatically be called by destructor if not manually called |
| 127 // beforehand. Returns true if it was watching, false otherwise. | 127 // beforehand. Returns true if it was watching, false otherwise. |
| 128 LONG StopWatching(); | 128 LONG StopWatching(); |
| 129 | 129 |
| 130 inline bool IsWatching() const { return watch_event_ != 0; } | 130 inline bool IsWatching() const { return watch_event_ != 0; } |
| 131 HANDLE watch_event() const { return watch_event_; } | 131 HANDLE watch_event() const { return watch_event_; } |
| 132 HKEY Handle() const { return key_; } | 132 HKEY Handle() const { return key_; } |
| 133 | 133 |
| 134 private: | 134 private: |
| 135 static LONG RegDeleteKeyExWrapper(HKEY hKey, const wchar_t* lpSubKey, | |
|
grt (UTC plus 2)
2014/05/16 15:44:43
add doc string
Will Harris
2014/05/16 22:55:45
Done.
| |
| 136 REGSAM samDesired, DWORD Reserved); | |
| 137 LONG RegDelRecurse(HKEY root_key, std::wstring name, REGSAM access); | |
|
grt (UTC plus 2)
2014/05/16 15:44:43
add doc string
Will Harris
2014/05/16 22:55:45
Done.
| |
| 135 HKEY key_; // The registry key being iterated. | 138 HKEY key_; // The registry key being iterated. |
| 136 HANDLE watch_event_; | 139 HANDLE watch_event_; |
| 140 REGSAM wow64access_; | |
| 137 | 141 |
| 138 DISALLOW_COPY_AND_ASSIGN(RegKey); | 142 DISALLOW_COPY_AND_ASSIGN(RegKey); |
| 139 }; | 143 }; |
| 140 | 144 |
| 141 // Iterates the entries found in a particular folder on the registry. | 145 // Iterates the entries found in a particular folder on the registry. |
| 142 class BASE_EXPORT RegistryValueIterator { | 146 class BASE_EXPORT RegistryValueIterator { |
| 143 public: | 147 public: |
| 144 RegistryValueIterator(HKEY root_key, const wchar_t* folder_key); | 148 RegistryValueIterator(HKEY root_key, const wchar_t* folder_key); |
| 145 | 149 |
| 146 ~RegistryValueIterator(); | 150 ~RegistryValueIterator(); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 210 | 214 |
| 211 wchar_t name_[MAX_PATH]; | 215 wchar_t name_[MAX_PATH]; |
| 212 | 216 |
| 213 DISALLOW_COPY_AND_ASSIGN(RegistryKeyIterator); | 217 DISALLOW_COPY_AND_ASSIGN(RegistryKeyIterator); |
| 214 }; | 218 }; |
| 215 | 219 |
| 216 } // namespace win | 220 } // namespace win |
| 217 } // namespace base | 221 } // namespace base |
| 218 | 222 |
| 219 #endif // BASE_WIN_REGISTRY_H_ | 223 #endif // BASE_WIN_REGISTRY_H_ |
| OLD | NEW |