summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-12 00:36:02 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-12 00:36:02 +0000
commite2e94f957a14b62c2e2d618bf976d101c38d2dce (patch)
treed5940d517bbdf60dc4c780407e64ab19074fb5dd /base
parent15fec826367f134670bf4b4134ae88055b71c84e (diff)
downloadchromium_src-e2e94f957a14b62c2e2d618bf976d101c38d2dce.zip
chromium_src-e2e94f957a14b62c2e2d618bf976d101c38d2dce.tar.gz
chromium_src-e2e94f957a14b62c2e2d618bf976d101c38d2dce.tar.bz2
Cleanup Registry API part 2:
- Move destructor implementation to source file. - Remove the default argument used in CreateWithDisposition function. BUG=44644 TEST=trybots Review URL: http://codereview.chromium.org/3100001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55820 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/registry.cc4
-rw-r--r--base/registry.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/base/registry.cc b/base/registry.cc
index d4158df..0040e1a 100644
--- a/base/registry.cc
+++ b/base/registry.cc
@@ -145,6 +145,10 @@ RegKey::RegKey(HKEY rootkey, const wchar_t* subkey, REGSAM access)
}
}
+RegKey::~RegKey() {
+ Close();
+}
+
void RegKey::Close() {
StopWatching();
if (key_) {
diff --git a/base/registry.h b/base/registry.h
index a9a6997..4702a78 100644
--- a/base/registry.h
+++ b/base/registry.h
@@ -22,12 +22,12 @@ class RegKey {
public:
RegKey(HKEY rootkey = NULL, const wchar_t* subkey = NULL,
REGSAM access = KEY_READ);
- ~RegKey() { Close(); }
+ ~RegKey();
bool Create(HKEY rootkey, const wchar_t* subkey, REGSAM access = KEY_READ);
bool CreateWithDisposition(HKEY rootkey, const wchar_t* subkey,
- DWORD* disposition, REGSAM access = KEY_READ);
+ DWORD* disposition, REGSAM access);
bool Open(HKEY rootkey, const wchar_t* subkey, REGSAM access = KEY_READ);