// Copyright 2012 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef BASE_WIN_WINDOWS_VERSION_H_ #define BASE_WIN_WINDOWS_VERSION_H_ #include <stddef.h> #include <string> #include "base/base_export.h" #include "base/gtest_prod_util.h" #include "base/version.h" DWORD; // NOLINT(runtime/int) HANDLE; struct _OSVERSIONINFOEXW; struct _SYSTEM_INFO; namespace base { namespace test { class ScopedOSInfoOverride; } // namespace test } // namespace base namespace base { namespace win { // The running version of Windows. This is declared outside OSInfo for // syntactic sugar reasons; see the declaration of GetVersion() below. // NOTE: Keep these in order so callers can do things like // "if (base::win::GetVersion() >= base::win::Version::VISTA) ...". enum class Version { … }; // A rough bucketing of the available types of versions of Windows. This is used // to distinguish enterprise enabled versions from home versions and potentially // server versions. Keep these values in the same order, since they are used as // is for metrics histogram ids. enum VersionType { … }; // A singleton that can be used to query various pieces of information about the // OS and process state. Note that this doesn't use the base Singleton class, so // it can be used without an AtExitManager. class BASE_EXPORT OSInfo { … }; // Because this is by far the most commonly-requested value from the above // singleton, we add a global-scope accessor here as syntactic sugar. BASE_EXPORT Version GetVersion(); } // namespace win } // namespace base #endif // BASE_WIN_WINDOWS_VERSION_H_