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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/browser_main_loop.h" 5 #include "content/browser/browser_main_loop.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 #include "ui/ozone/public/client_native_pixmap_factory.h" 124 #include "ui/ozone/public/client_native_pixmap_factory.h"
125 #include "ui/ozone/public/ozone_platform.h" 125 #include "ui/ozone/public/ozone_platform.h"
126 #endif 126 #endif
127 127
128 #if defined(OS_WIN) 128 #if defined(OS_WIN)
129 #include <windows.h> 129 #include <windows.h>
130 #include <commctrl.h> 130 #include <commctrl.h>
131 #include <shellapi.h> 131 #include <shellapi.h>
132 132
133 #include "base/memory/memory_pressure_monitor_win.h" 133 #include "base/memory/memory_pressure_monitor_win.h"
134 #include "base/win/windows_version.h"
134 #include "content/common/sandbox_win.h" 135 #include "content/common/sandbox_win.h"
135 #include "net/base/winsock_init.h" 136 #include "net/base/winsock_init.h"
136 #include "ui/base/l10n/l10n_util_win.h" 137 #include "ui/base/l10n/l10n_util_win.h"
137 #endif 138 #endif
138 139
139 #if defined(OS_CHROMEOS) 140 #if defined(OS_CHROMEOS)
140 #include "base/memory/memory_pressure_monitor_chromeos.h" 141 #include "base/memory/memory_pressure_monitor_chromeos.h"
141 #include "chromeos/chromeos_switches.h" 142 #include "chromeos/chromeos_switches.h"
142 #endif 143 #endif
143 144
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 // Enable memory-infra dump providers. 689 // Enable memory-infra dump providers.
689 InitSkiaEventTracer(); 690 InitSkiaEventTracer();
690 tracing::ProcessMetricsMemoryDumpProvider::RegisterForProcess( 691 tracing::ProcessMetricsMemoryDumpProvider::RegisterForProcess(
691 base::kNullProcessId); 692 base::kNullProcessId);
692 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( 693 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
693 HostSharedBitmapManager::current(), "HostSharedBitmapManager", nullptr); 694 HostSharedBitmapManager::current(), "HostSharedBitmapManager", nullptr);
694 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( 695 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
695 skia::SkiaMemoryDumpProvider::GetInstance(), "Skia", nullptr); 696 skia::SkiaMemoryDumpProvider::GetInstance(), "Skia", nullptr);
696 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( 697 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
697 sql::SqlMemoryDumpProvider::GetInstance(), "Sql", nullptr); 698 sql::SqlMemoryDumpProvider::GetInstance(), "Sql", nullptr);
699
700 #if defined(OS_WIN)
701 UMA_HISTOGRAM_ENUMERATION("Windows.GetVersionExVersion",
702 base::win::OSInfo::GetInstance()->version(),
703 base::win::VERSION_WIN_LAST);
704 UMA_HISTOGRAM_ENUMERATION(
705 "Windows.Kernel32Version",
706 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
707 base::win::VERSION_WIN_LAST);
708 UMA_HISTOGRAM_BOOLEAN(
709 "Windows.InCompatibilityMode",
710 base::win::OSInfo::GetInstance()->version() !=
711 base::win::OSInfo::GetInstance()->kernel32_version());
712 #endif // OS_WIN
698 } 713 }
699 714
700 int BrowserMainLoop::PreCreateThreads() { 715 int BrowserMainLoop::PreCreateThreads() {
701 if (parts_) { 716 if (parts_) {
702 TRACE_EVENT0("startup", 717 TRACE_EVENT0("startup",
703 "BrowserMainLoop::CreateThreads:PreCreateThreads"); 718 "BrowserMainLoop::CreateThreads:PreCreateThreads");
704 TRACK_SCOPED_REGION("Startup", "BrowserMainLoop::PreCreateThreads"); 719 TRACK_SCOPED_REGION("Startup", "BrowserMainLoop::PreCreateThreads");
705 720
706 result_code_ = parts_->PreCreateThreads(); 721 result_code_ = parts_->PreCreateThreads();
707 } 722 }
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
1466 DCHECK(is_tracing_startup_for_duration_); 1481 DCHECK(is_tracing_startup_for_duration_);
1467 1482
1468 is_tracing_startup_for_duration_ = false; 1483 is_tracing_startup_for_duration_ = false;
1469 TracingController::GetInstance()->StopTracing( 1484 TracingController::GetInstance()->StopTracing(
1470 TracingController::CreateFileSink( 1485 TracingController::CreateFileSink(
1471 startup_trace_file_, 1486 startup_trace_file_,
1472 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); 1487 base::Bind(OnStoppedStartupTracing, startup_trace_file_)));
1473 } 1488 }
1474 1489
1475 } // namespace content 1490 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698