diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-14 02:13:43 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-14 02:13:43 +0000 |
commit | 87e70062789c3695762c0ddaca1a759e8834398a (patch) | |
tree | 613a0a5fb74bc0ca8417976788fcce2666753d23 /base | |
parent | b5ff342a5aca83396114933152ad5d644f536375 (diff) | |
download | chromium_src-87e70062789c3695762c0ddaca1a759e8834398a.zip chromium_src-87e70062789c3695762c0ddaca1a759e8834398a.tar.gz chromium_src-87e70062789c3695762c0ddaca1a759e8834398a.tar.bz2 |
Cleanup Registry API: part 3.
- Remove the default arguments from the constructor.
- Add a empty constructor to handle the case of the default arguments were used.
BUG=44644
TEST=trybots
Review URL: http://codereview.chromium.org/3172009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56123 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/registry.cc | 5 | ||||
-rw-r--r-- | base/registry.h | 4 | ||||
-rw-r--r-- | base/win_util.cc | 5 |
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; |