| 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 const base::win::OSInfo& os_info = *base::win::OSInfo::GetInstance(); |
| 146 UMA_HISTOGRAM_ENUMERATION("Windows.GetVersionExVersion", os_info.version(), |
| 147 base::win::VERSION_WIN_LAST); |
| 148 UMA_HISTOGRAM_ENUMERATION("Windows.Kernel32Version", |
| 149 os_info.Kernel32Version(), |
| 150 base::win::VERSION_WIN_LAST); |
| 151 UMA_HISTOGRAM_BOOLEAN("Windows.InCompatibilityMode", |
| 152 os_info.version() != os_info.Kernel32Version()); |
| 143 #endif // defined(OS_WIN) | 153 #endif // defined(OS_WIN) |
| 144 | 154 |
| 145 #if defined(OS_MACOSX) | 155 #if defined(OS_MACOSX) |
| 146 bluetooth_utility::BluetoothAvailability availability = | 156 bluetooth_utility::BluetoothAvailability availability = |
| 147 bluetooth_utility::GetBluetoothAvailability(); | 157 bluetooth_utility::GetBluetoothAvailability(); |
| 148 UMA_HISTOGRAM_ENUMERATION("OSX.BluetoothAvailability", | 158 UMA_HISTOGRAM_ENUMERATION("OSX.BluetoothAvailability", |
| 149 availability, | 159 availability, |
| 150 bluetooth_utility::BLUETOOTH_AVAILABILITY_COUNT); | 160 bluetooth_utility::BLUETOOTH_AVAILABILITY_COUNT); |
| 151 #endif // defined(OS_MACOSX) | 161 #endif // defined(OS_MACOSX) |
| 152 | 162 |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 } | 388 } |
| 379 } | 389 } |
| 380 | 390 |
| 381 namespace chrome { | 391 namespace chrome { |
| 382 | 392 |
| 383 void AddMetricsExtraParts(ChromeBrowserMainParts* main_parts) { | 393 void AddMetricsExtraParts(ChromeBrowserMainParts* main_parts) { |
| 384 main_parts->AddParts(new ChromeBrowserMainExtraPartsMetrics()); | 394 main_parts->AddParts(new ChromeBrowserMainExtraPartsMetrics()); |
| 385 } | 395 } |
| 386 | 396 |
| 387 } // namespace chrome | 397 } // namespace chrome |
| OLD | NEW |