summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
Diffstat (limited to 'base')
-rw-r--r--base/registry.cc5
-rw-r--r--base/registry.h4
-rw-r--r--base/win_util.cc5
3 files changed, 10 insertions, 4 deletions
diff --git a/base/registry.cc b/base/registry.cc
index 0040e1a..f8e58b9 100644
--- a/base/registry.cc
+++ b/base/registry.cc
@@ -132,6 +132,11 @@ DWORD RegistryKeyIterator::SubkeyCount() const {
return count;
}
+RegKey::RegKey()
+ : key_(NULL),
+ watch_event_(0) {
+}
+
RegKey::RegKey(HKEY rootkey, const wchar_t* subkey, REGSAM access)
: key_(NULL),
watch_event_(0) {
diff --git a/base/registry.h b/base/registry.h
index 4702a78..b9427ea 100644
--- a/base/registry.h
+++ b/base/registry.h
@@ -20,8 +20,8 @@
// are "values", which are <name, data> pairs, with an associated data type.
class RegKey {
public:
- RegKey(HKEY rootkey = NULL, const wchar_t* subkey = NULL,
- REGSAM access = KEY_READ);
+ RegKey();
+ RegKey(HKEY rootkey, const wchar_t* subkey, REGSAM access);
~RegKey();
bool Create(HKEY rootkey, const wchar_t* subkey, REGSAM access = KEY_READ);
diff --git a/base/win_util.cc b/base/win_util.cc
index 12cf241..49a20c8 100644
--- a/base/win_util.cc
+++ b/base/win_util.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -350,7 +350,8 @@ std::wstring GetClassName(HWND window) {
bool UserAccountControlIsEnabled() {
RegKey key(HKEY_LOCAL_MACHINE,
- L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System");
+ L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System",
+ KEY_READ);
DWORD uac_enabled;
if (!key.ReadValueDW(L"EnableLUA", &uac_enabled))
return true;