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

Unified Diff: base/win/registry.h

Issue 8337006: base/win: small improvement to RegKey API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Close -> Closes Created 9 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') | 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 078e6e07d52b6bc87b200aee3d16538f95da01aa..e567bf2f0ddaa763eae032e4aa6bf64332482cec 100644
--- a/base/win/registry.h
+++ b/base/win/registry.h
@@ -33,20 +33,26 @@ class BASE_EXPORT RegKey {
LONG CreateWithDisposition(HKEY rootkey, const wchar_t* subkey,
DWORD* disposition, REGSAM access);
- LONG Open(HKEY rootkey, const wchar_t* subkey, REGSAM access);
-
// Creates a subkey or open it if it already exists.
LONG CreateKey(const wchar_t* name, REGSAM access);
- // Opens a subkey
- LONG OpenKey(const wchar_t* name, REGSAM access);
+ // Opens an existing reg key.
+ LONG Open(HKEY rootkey, const wchar_t* subkey, REGSAM access);
+
+ // Opens an existing reg key, given the full key name.
grt (UTC plus 2) 2011/10/18 15:00:00 full_key_name and this comment are misleading. Th
tfarina 2011/10/18 15:47:04 Done.
+ LONG OpenKey(const wchar_t* full_key_name, REGSAM access);
+ // Closes this reg key.
void Close();
- DWORD ValueCount() const;
+ // Returns true if this key has the specified value.
+ bool HasValue(const wchar_t* value_name) const;
grt (UTC plus 2) 2011/10/18 15:00:00 The following is more accurate: // Returns false i
tfarina 2011/10/18 15:47:04 Done.
+
+ // Returns the number of values for this key.
grt (UTC plus 2) 2011/10/18 15:00:00 // Returns the number of values for this key, or 0
tfarina 2011/10/18 15:47:04 Done.
+ DWORD GetValueCount() const;
// Determine the nth value's name.
- LONG ReadName(int index, std::wstring* name) const;
+ LONG GetValueNameAt(int index, std::wstring* name) const;
// True while the key is valid.
bool Valid() const { return key_ != NULL; }
@@ -58,8 +64,6 @@ class BASE_EXPORT RegKey {
// Deletes a single value within the key.
LONG DeleteValue(const wchar_t* name);
- bool ValueExists(const wchar_t* name) const;
-
LONG ReadValue(const wchar_t* name, void* data, DWORD* dsize,
DWORD* dtype) const;
LONG ReadValue(const wchar_t* name, std::wstring* value) const;
« 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