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

Unified Diff: base/win/registry.cc

Issue 5623004: Making a few RegKey methods that only read data, const.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years 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 | « base/win/registry.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/registry.cc
===================================================================
--- base/win/registry.cc (revision 68351)
+++ base/win/registry.cc (working copy)
@@ -244,7 +244,7 @@
return (result == ERROR_SUCCESS);
}
-DWORD RegKey::ValueCount() {
+DWORD RegKey::ValueCount() const {
base::ThreadRestrictions::AssertIOAllowed();
DWORD count = 0;
HRESULT result = RegQueryInfoKey(key_, NULL, 0, NULL, NULL, NULL,
@@ -252,7 +252,7 @@
return (result != ERROR_SUCCESS) ? 0 : count;
}
-bool RegKey::ReadName(int index, std::wstring* name) {
+bool RegKey::ReadName(int index, std::wstring* name) const {
base::ThreadRestrictions::AssertIOAllowed();
wchar_t buf[256];
DWORD bufsize = arraysize(buf);
@@ -274,7 +274,7 @@
}
bool RegKey::ReadValue(const wchar_t* name, void* data,
- DWORD* dsize, DWORD* dtype) {
+ DWORD* dsize, DWORD* dtype) const {
base::ThreadRestrictions::AssertIOAllowed();
if (!key_)
return false;
@@ -283,7 +283,7 @@
return (result == ERROR_SUCCESS);
}
-bool RegKey::ReadValue(const wchar_t* name, std::wstring* value) {
+bool RegKey::ReadValue(const wchar_t* name, std::wstring* value) const {
base::ThreadRestrictions::AssertIOAllowed();
DCHECK(value);
const size_t kMaxStringLength = 1024; // This is after expansion.
@@ -312,7 +312,7 @@
return false;
}
-bool RegKey::ReadValueDW(const wchar_t* name, DWORD* value) {
+bool RegKey::ReadValueDW(const wchar_t* name, DWORD* value) const {
DCHECK(value);
DWORD type = REG_DWORD;
DWORD size = sizeof(DWORD);
« no previous file with comments | « base/win/registry.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698