Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Unified Diff: content/browser/browser_main_loop.cc

Issue 1784623003: Add histograms to compare GetVersionEx() with VerQueryValue() of kernel32 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/browser_main_loop.cc
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index 2b1664fa2fc4bd83567be2e1d6eeec7f6291b47c..59ee0398e97e47c2350817b7e8566a08d9058338 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -131,6 +131,7 @@
#include <shellapi.h>
#include "base/memory/memory_pressure_monitor_win.h"
+#include "base/win/windows_version.h"
#include "content/common/sandbox_win.h"
#include "net/base/winsock_init.h"
#include "ui/base/l10n/l10n_util_win.h"
@@ -695,6 +696,20 @@ void BrowserMainLoop::PostMainMessageLoopStart() {
skia::SkiaMemoryDumpProvider::GetInstance(), "Skia", nullptr);
base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
sql::SqlMemoryDumpProvider::GetInstance(), "Sql", nullptr);
+
+#if defined(OS_WIN)
+ UMA_HISTOGRAM_ENUMERATION("Windows.GetVersionExVersion",
+ base::win::OSInfo::GetInstance()->version(),
+ base::win::VERSION_WIN_LAST);
+ UMA_HISTOGRAM_ENUMERATION(
+ "Windows.Kernel32Version",
+ base::win::OSInfo::GetInstance()->kernel32_version(),
Will Harris 2016/03/09 23:02:50 given this call can loadlibrary, should it be move
scottmg 2016/03/10 00:41:31 Done. (It wouldn't have done IO here before, but n
+ base::win::VERSION_WIN_LAST);
+ UMA_HISTOGRAM_BOOLEAN(
+ "Windows.InCompatibilityMode",
+ base::win::OSInfo::GetInstance()->version() !=
+ base::win::OSInfo::GetInstance()->kernel32_version());
+#endif // OS_WIN
}
int BrowserMainLoop::PreCreateThreads() {

Powered by Google App Engine
This is Rietveld 408576698