forked from crosswalk-project/chromium-crosswalk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add histograms to compare GetVersionEx() with VerQueryValue() of kern…
…el32 Checking VerQueryValue() of kernel32 reports the "real" OS, rather than the potentially shimmed one that GetVersionEx() reports. Normally it's better to use GetVersionEx() because that'll determine the APIs that are available and how they behave. However, we'd like to know if there are a substantial percentage of users in compatibility mode, as there have been complaints of users seeing the "XP and Vista are no longer supported" infobar on Windows 7. [email protected], [email protected], [email protected], [email protected] BUG=581499 Review URL: https://codereview.chromium.org/1784623003 Cr-Commit-Position: refs/heads/master@{#380793} (cherry picked from commit d68b1e1) Review URL: https://codereview.chromium.org/1797073003 . Cr-Commit-Position: refs/branch-heads/2661@{crosswalk-project#233} Cr-Branched-From: ef6f6ae-refs/heads/master@{#378081}
- Loading branch information
Showing
7 changed files
with
159 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright 2016 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. | ||
|
||
#include "base/win/windows_version.h" | ||
|
||
#include "testing/gtest/include/gtest/gtest.h" | ||
|
||
namespace base { | ||
namespace win { | ||
namespace { | ||
|
||
TEST(WindowsVersion, GetVersionExAndKernelVersionMatch) { | ||
// If this fails, we're running in compatibility mode, or need to update the | ||
// application manifest. | ||
EXPECT_EQ(OSInfo::GetInstance()->version(), | ||
OSInfo::GetInstance()->Kernel32Version()); | ||
} | ||
|
||
} // namespace | ||
} // namespace win | ||
} // namespace base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57956,6 +57956,31 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. | |
</summary> | ||
</histogram> | ||
|
||
<histogram name="Windows.GetVersionExVersion" enum="WindowsVersion"> | ||
<owner>[email protected]</owner> | ||
<summary> | ||
The Windows version (base::win::Version) as reported by GetVersionEx(). This | ||
is queried shortly after startup. | ||
</summary> | ||
</histogram> | ||
|
||
<histogram name="Windows.InCompatibilityMode" enum="BooleanCompatibilityMode"> | ||
<owner>[email protected]</owner> | ||
<summary> | ||
A boolean used to indicate when the Windows version reported by | ||
GetVersionEx() and the Windows version reported by VerQueryValue() on | ||
kernel32 do not match. This is queried shortly after startup. | ||
</summary> | ||
</histogram> | ||
|
||
<histogram name="Windows.Kernel32Version" enum="WindowsVersion"> | ||
<owner>[email protected]</owner> | ||
<summary> | ||
The Windows version (base::win::Version) as reported by VeryQueryValue() on | ||
kernel32.dll. This is queried shortly after startup. | ||
</summary> | ||
</histogram> | ||
|
||
<histogram name="Windows.Tablet" enum="BooleanTablet"> | ||
<owner>[email protected]</owner> | ||
<summary>Count of browser launches from a Windows tablet pc.</summary> | ||
|
@@ -59633,6 +59658,11 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. | |
<int value="1" label="Common Name used"/> | ||
</enum> | ||
|
||
<enum name="BooleanCompatibilityMode" type="int"> | ||
<int value="0" label="Not in compatibility mode"/> | ||
<int value="1" label="In compatibility mode"/> | ||
</enum> | ||
|
||
<enum name="BooleanCompleted" type="int"> | ||
<int value="0" label="Not Completed"/> | ||
<int value="1" label="Completed"/> | ||
|
@@ -83515,6 +83545,9 @@ To add a new entry, add it with any value and run test to compute valid value. | |
<int value="3" label="Vista"/> | ||
<int value="4" label="Windows 7"/> | ||
<int value="5" label="Windows 8"/> | ||
<int value="6" label="Windows 8.1"/> | ||
<int value="7" label="Windows 10"/> | ||
<int value="8" label="Windows 10 TH2"/> | ||
</enum> | ||
|
||
<enum name="WindowType" type="int"> | ||
|