| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 // All Rights Reserved. | 4 // All Rights Reserved. |
| 5 | 5 |
| 6 #ifndef BASE_REGISTRY_H__ | 6 #ifndef BASE_REGISTRY_H__ |
| 7 #define BASE_REGISTRY_H__ | 7 #define BASE_REGISTRY_H__ |
| 8 | 8 |
| 9 #include <windows.h> | 9 #include <windows.h> |
| 10 #include <tchar.h> | 10 #include <tchar.h> |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 // Otherwise, returns true if anything under the key has changed. | 81 // Otherwise, returns true if anything under the key has changed. |
| 82 // This can't be const because the watch_event_ may be refreshed. | 82 // This can't be const because the watch_event_ may be refreshed. |
| 83 bool HasChanged(); | 83 bool HasChanged(); |
| 84 | 84 |
| 85 // StopWatching() | 85 // StopWatching() |
| 86 // Will automatically be called by destructor if not manually called | 86 // Will automatically be called by destructor if not manually called |
| 87 // beforehand. Returns true if it was watching, false otherwise. | 87 // beforehand. Returns true if it was watching, false otherwise. |
| 88 bool StopWatching(); | 88 bool StopWatching(); |
| 89 | 89 |
| 90 inline bool IsWatching() const { return watch_event_ != 0; } | 90 inline bool IsWatching() const { return watch_event_ != 0; } |
| 91 HANDLE watch_event() const { return watch_event_; } |
| 91 HKEY Handle() const { return key_; } | 92 HKEY Handle() const { return key_; } |
| 92 | 93 |
| 93 private: | 94 private: |
| 94 HKEY key_; // the registry key being iterated | 95 HKEY key_; // the registry key being iterated |
| 95 HANDLE watch_event_; | 96 HANDLE watch_event_; |
| 96 }; | 97 }; |
| 97 | 98 |
| 98 | 99 |
| 99 // Standalone registry functions -- sorta deprecated, they now map to | 100 // Standalone registry functions -- sorta deprecated, they now map to |
| 100 // using RegKey | 101 // using RegKey |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 const tchar* modulepath); | 216 const tchar* modulepath); |
| 216 bool RegisterCOMServer(const tchar* guid, const tchar* name, HINSTANCE module); | 217 bool RegisterCOMServer(const tchar* guid, const tchar* name, HINSTANCE module); |
| 217 bool UnregisterCOMServer(const tchar* guid); | 218 bool UnregisterCOMServer(const tchar* guid); |
| 218 | 219 |
| 219 // undo the local types defined above | 220 // undo the local types defined above |
| 220 #undef tchar | 221 #undef tchar |
| 221 #undef CTP | 222 #undef CTP |
| 222 #undef tstr | 223 #undef tstr |
| 223 | 224 |
| 224 #endif // BASE_REGISTRY_H__ | 225 #endif // BASE_REGISTRY_H__ |
| OLD | NEW |