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

Unified Diff: base/win/registry.h

Issue 616173003: Allow Registry Iterator functions to use a specified WOW64 mode when iterating. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: code review comments 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 | « no previous file | base/win/registry.cc » ('j') | content/common/plugin_list_win.cc » ('J')
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 af1aee7dce9d56d01cf911444bbf017bd67259eb..e5524b883fd24e1e24d99b85a1a0845d6ca6950c 100644
--- a/base/win/registry.h
+++ b/base/win/registry.h
@@ -157,8 +157,18 @@ class BASE_EXPORT RegKey {
// Iterates the entries found in a particular folder on the registry.
class BASE_EXPORT RegistryValueIterator {
public:
+ // Construct a Registry Value Iterator with default WOW64 access.
RegistryValueIterator(HKEY root_key, const wchar_t* folder_key);
+ // Construct a Registry Key Iterator with specific WOW64 access, one of
+ // KEY_WOW64_32KEY or KEY_WOW64_64KEY, or 0.
+ // Note: |wow64access| should be the same access used to open |root_key|
+ // previously, or a predefined key (e.g. HKEY_LOCAL_MACHINE).
+ // See http://msdn.microsoft.com/en-us/library/windows/desktop/aa384129.aspx.
+ RegistryValueIterator(HKEY root_key,
+ const wchar_t* folder_key,
+ REGSAM wow64access);
+
~RegistryValueIterator();
DWORD ValueCount() const;
@@ -181,6 +191,8 @@ class BASE_EXPORT RegistryValueIterator {
// Read in the current values.
bool Read();
+ void Initialize(HKEY root_key, const wchar_t* folder_key, REGSAM wow64access);
+
// The registry key being iterated.
HKEY key_;
@@ -198,8 +210,18 @@ class BASE_EXPORT RegistryValueIterator {
class BASE_EXPORT RegistryKeyIterator {
public:
+ // Construct a Registry Key Iterator with default WOW64 access.
RegistryKeyIterator(HKEY root_key, const wchar_t* folder_key);
+ // Construct a Registry Value Iterator with specific WOW64 access, one of
+ // KEY_WOW64_32KEY or KEY_WOW64_64KEY, or 0.
+ // Note: |wow64access| should be the same access used to open |root_key|
+ // previously, or a predefined key (e.g. HKEY_LOCAL_MACHINE).
+ // See http://msdn.microsoft.com/en-us/library/windows/desktop/aa384129.aspx.
+ RegistryKeyIterator(HKEY root_key,
+ const wchar_t* folder_key,
+ REGSAM wow64access);
+
~RegistryKeyIterator();
DWORD SubkeyCount() const;
@@ -218,6 +240,8 @@ class BASE_EXPORT RegistryKeyIterator {
// Read in the current values.
bool Read();
+ void Initialize(HKEY root_key, const wchar_t* folder_key, REGSAM wow64access);
+
// The registry key being iterated.
HKEY key_;
« no previous file with comments | « no previous file | base/win/registry.cc » ('j') | content/common/plugin_list_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698