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

Side by Side Diff: base/win/registry.h

Issue 275103012: Add WOW64 support and DeleteEmptyKey to base::win::registry. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: code review changes Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | base/win/registry.cc » ('j') | base/win/registry.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 // Wrapper function for RegDeleteKeyEx which is not supported on all
grt (UTC plus 2) 2014/05/17 12:54:33 Please make the comments descriptive as per the st
Will Harris 2014/05/19 21:49:03 Done.
136 // platforms. Behaves like RegDeleteKeyEx.
137 static LONG RegDeleteKeyExWrapper(HKEY hKey,
138 const wchar_t* lpSubKey,
139 REGSAM samDesired,
140 DWORD Reserved);
141
142 // Internal function to perform a recursive registry key delete.
grt (UTC plus 2) 2014/05/17 12:54:33 suggestion: // Recursively deletes a key and all
Will Harris 2014/05/19 21:49:03 Done.
143 static LONG RegDelRecurse(HKEY root_key,
144 std::wstring const& name,
grt (UTC plus 2) 2014/05/17 12:54:33 const std::wstring&
Will Harris 2014/05/19 21:49:03 Done.
145 REGSAM access);
135 HKEY key_; // The registry key being iterated. 146 HKEY key_; // The registry key being iterated.
136 HANDLE watch_event_; 147 HANDLE watch_event_;
148 REGSAM wow64access_;
137 149
138 DISALLOW_COPY_AND_ASSIGN(RegKey); 150 DISALLOW_COPY_AND_ASSIGN(RegKey);
139 }; 151 };
140 152
141 // Iterates the entries found in a particular folder on the registry. 153 // Iterates the entries found in a particular folder on the registry.
142 class BASE_EXPORT RegistryValueIterator { 154 class BASE_EXPORT RegistryValueIterator {
143 public: 155 public:
144 RegistryValueIterator(HKEY root_key, const wchar_t* folder_key); 156 RegistryValueIterator(HKEY root_key, const wchar_t* folder_key);
145 157
146 ~RegistryValueIterator(); 158 ~RegistryValueIterator();
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 222
211 wchar_t name_[MAX_PATH]; 223 wchar_t name_[MAX_PATH];
212 224
213 DISALLOW_COPY_AND_ASSIGN(RegistryKeyIterator); 225 DISALLOW_COPY_AND_ASSIGN(RegistryKeyIterator);
214 }; 226 };
215 227
216 } // namespace win 228 } // namespace win
217 } // namespace base 229 } // namespace base
218 230
219 #endif // BASE_WIN_REGISTRY_H_ 231 #endif // BASE_WIN_REGISTRY_H_
OLDNEW
« no previous file with comments | « no previous file | base/win/registry.cc » ('j') | base/win/registry.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698