OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h" | 5 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
44 #include "ui/base/x/x11_util.h" | 44 #include "ui/base/x/x11_util.h" |
45 #endif | 45 #endif |
46 #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) | 46 #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) |
47 | 47 |
48 #if defined(USE_OZONE) || defined(USE_X11) | 48 #if defined(USE_OZONE) || defined(USE_X11) |
49 #include "ui/events/devices/device_data_manager.h" | 49 #include "ui/events/devices/device_data_manager.h" |
50 #include "ui/events/devices/input_device_event_observer.h" | 50 #include "ui/events/devices/input_device_event_observer.h" |
51 #endif // defined(USE_OZONE) || defined(USE_X11) | 51 #endif // defined(USE_OZONE) || defined(USE_X11) |
52 | 52 |
53 #if defined(OS_WIN) | 53 #if defined(OS_WIN) |
54 #include "base/win/windows_version.h" | |
54 #include "chrome/installer/util/google_update_settings.h" | 55 #include "chrome/installer/util/google_update_settings.h" |
55 #endif // defined(OS_WIN) | 56 #endif // defined(OS_WIN) |
56 | 57 |
57 namespace { | 58 namespace { |
58 | 59 |
59 enum UMALinuxGlibcVersion { | 60 enum UMALinuxGlibcVersion { |
60 UMA_LINUX_GLIBC_NOT_PARSEABLE, | 61 UMA_LINUX_GLIBC_NOT_PARSEABLE, |
61 UMA_LINUX_GLIBC_UNKNOWN, | 62 UMA_LINUX_GLIBC_UNKNOWN, |
62 UMA_LINUX_GLIBC_2_11, | 63 UMA_LINUX_GLIBC_2_11, |
63 // To log newer versions, just update tools/metrics/histograms/histograms.xml. | 64 // To log newer versions, just update tools/metrics/histograms/histograms.xml. |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
133 #endif // defined(OS_ANDROID) && defined(__arm__) | 134 #endif // defined(OS_ANDROID) && defined(__arm__) |
134 UMA_HISTOGRAM_SPARSE_SLOWLY("Platform.LogicalCpuCount", | 135 UMA_HISTOGRAM_SPARSE_SLOWLY("Platform.LogicalCpuCount", |
135 base::SysInfo::NumberOfProcessors()); | 136 base::SysInfo::NumberOfProcessors()); |
136 } | 137 } |
137 | 138 |
138 // Called on the blocking pool some time after startup to avoid slowing down | 139 // Called on the blocking pool some time after startup to avoid slowing down |
139 // startup with metrics that aren't trivial to compute. | 140 // startup with metrics that aren't trivial to compute. |
140 void RecordStartupMetricsOnBlockingPool() { | 141 void RecordStartupMetricsOnBlockingPool() { |
141 #if defined(OS_WIN) | 142 #if defined(OS_WIN) |
142 GoogleUpdateSettings::RecordChromeUpdatePolicyHistograms(); | 143 GoogleUpdateSettings::RecordChromeUpdatePolicyHistograms(); |
144 | |
145 UMA_HISTOGRAM_ENUMERATION("Windows.GetVersionExVersion", | |
146 base::win::OSInfo::GetInstance()->version(), | |
147 base::win::VERSION_WIN_LAST); | |
148 UMA_HISTOGRAM_ENUMERATION("Windows.Kernel32Version", | |
149 base::win::OSInfo::GetInstance()->Kernel32Version(), | |
150 base::win::VERSION_WIN_LAST); | |
151 UMA_HISTOGRAM_BOOLEAN( | |
152 "Windows.InCompatibilityMode", | |
153 base::win::OSInfo::GetInstance()->version() != | |
154 base::win::OSInfo::GetInstance()->Kernel32Version()); | |
Alexei Svitkine (slow)
2016/03/11 20:16:51
Nit: make a local var for base::win::OSInfo::GetIn
scottmg
2016/03/11 22:44:26
Done.
| |
143 #endif // defined(OS_WIN) | 155 #endif // defined(OS_WIN) |
144 | 156 |
145 #if defined(OS_MACOSX) | 157 #if defined(OS_MACOSX) |
146 bluetooth_utility::BluetoothAvailability availability = | 158 bluetooth_utility::BluetoothAvailability availability = |
147 bluetooth_utility::GetBluetoothAvailability(); | 159 bluetooth_utility::GetBluetoothAvailability(); |
148 UMA_HISTOGRAM_ENUMERATION("OSX.BluetoothAvailability", | 160 UMA_HISTOGRAM_ENUMERATION("OSX.BluetoothAvailability", |
149 availability, | 161 availability, |
150 bluetooth_utility::BLUETOOTH_AVAILABILITY_COUNT); | 162 bluetooth_utility::BLUETOOTH_AVAILABILITY_COUNT); |
151 #endif // defined(OS_MACOSX) | 163 #endif // defined(OS_MACOSX) |
152 | 164 |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
378 } | 390 } |
379 } | 391 } |
380 | 392 |
381 namespace chrome { | 393 namespace chrome { |
382 | 394 |
383 void AddMetricsExtraParts(ChromeBrowserMainParts* main_parts) { | 395 void AddMetricsExtraParts(ChromeBrowserMainParts* main_parts) { |
384 main_parts->AddParts(new ChromeBrowserMainExtraPartsMetrics()); | 396 main_parts->AddParts(new ChromeBrowserMainExtraPartsMetrics()); |
385 } | 397 } |
386 | 398 |
387 } // namespace chrome | 399 } // namespace chrome |
OLD | NEW |