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

Unified 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: rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/win/registry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/registry.h
diff --git a/base/win/registry.h b/base/win/registry.h
index 2ef759bf4cba5724b0caa2c1ab77f60f76f1aebc..af1aee7dce9d56d01cf911444bbf017bd67259eb 100644
--- a/base/win/registry.h
+++ b/base/win/registry.h
@@ -71,6 +71,10 @@ class BASE_EXPORT RegKey {
// it.
LONG DeleteKey(const wchar_t* name);
+ // Deletes an empty subkey. If the subkey has subkeys or values then this
+ // will fail.
+ LONG DeleteEmptyKey(const wchar_t* name);
+
// Deletes a single value within the key.
LONG DeleteValue(const wchar_t* name);
@@ -132,8 +136,20 @@ class BASE_EXPORT RegKey {
HKEY Handle() const { return key_; }
private:
+ // Calls RegDeleteKeyEx on supported platforms, alternatively falls back to
+ // RegDeleteKey.
+ static LONG RegDeleteKeyExWrapper(HKEY hKey,
+ const wchar_t* lpSubKey,
+ REGSAM samDesired,
+ DWORD Reserved);
+
+ // Recursively deletes a key and all of its subkeys.
+ static LONG RegDelRecurse(HKEY root_key,
+ const std::wstring& name,
+ REGSAM access);
HKEY key_; // The registry key being iterated.
HANDLE watch_event_;
+ REGSAM wow64access_;
DISALLOW_COPY_AND_ASSIGN(RegKey);
};
« no previous file with comments | « no previous file | base/win/registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698