registry.h (1368B)
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim: set ts=2 et sw=2 tw=80: */ 3 /* This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 7 // This is a stripped down version of Chromium source file base/win/registry.h 8 // Within our copy of Chromium files this is only used in base/win/windows_version.cc 9 // in OSInfo::processor_model_name, which we don't use. 10 // It is also used in GetUBR, which is used as the VersionNumber.patch, which 11 // again is not needed by the sandbox. 12 13 #ifndef BASE_WIN_REGISTRY_H_ 14 #define BASE_WIN_REGISTRY_H_ 15 16 #include <winerror.h> 17 18 namespace base { 19 namespace win { 20 21 class BASE_EXPORT RegKey { 22 public: 23 RegKey() {}; 24 RegKey(HKEY rootkey, const wchar_t* subkey, REGSAM access) {} 25 26 RegKey(const RegKey&) = delete; 27 RegKey& operator=(const RegKey&) = delete; 28 29 ~RegKey() {} 30 31 LONG Open(HKEY rootkey, const wchar_t* subkey, REGSAM access) { 32 return ERROR_CANTOPEN; 33 } 34 35 LONG ReadValueDW(const wchar_t* name, DWORD* out_value) const 36 { 37 return ERROR_CANTREAD; 38 } 39 40 LONG ReadValue(const wchar_t* name, std::wstring* out_value) const 41 { 42 return ERROR_CANTREAD; 43 } 44 }; 45 46 } // namespace win 47 } // namespace base 48 49 #endif // BASE_WIN_REGISTRY_H_