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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 | 146 |
147 // Record whether Chrome is the default browser or not. | 147 // Record whether Chrome is the default browser or not. |
148 ShellIntegration::DefaultWebClientState default_state = | 148 ShellIntegration::DefaultWebClientState default_state = |
149 ShellIntegration::GetDefaultBrowser(); | 149 ShellIntegration::GetDefaultBrowser(); |
150 UMA_HISTOGRAM_ENUMERATION("DefaultBrowser.State", default_state, | 150 UMA_HISTOGRAM_ENUMERATION("DefaultBrowser.State", default_state, |
151 ShellIntegration::NUM_DEFAULT_STATES); | 151 ShellIntegration::NUM_DEFAULT_STATES); |
152 } | 152 } |
153 | 153 |
154 void RecordLinuxGlibcVersion() { | 154 void RecordLinuxGlibcVersion() { |
155 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 155 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
156 base::Version version(gnu_get_libc_version()); | 156 Version version(gnu_get_libc_version()); |
157 | 157 |
158 UMALinuxGlibcVersion glibc_version_result = UMA_LINUX_GLIBC_NOT_PARSEABLE; | 158 UMALinuxGlibcVersion glibc_version_result = UMA_LINUX_GLIBC_NOT_PARSEABLE; |
159 if (version.IsValid() && version.components().size() == 2) { | 159 if (version.IsValid() && version.components().size() == 2) { |
160 glibc_version_result = UMA_LINUX_GLIBC_UNKNOWN; | 160 glibc_version_result = UMA_LINUX_GLIBC_UNKNOWN; |
161 uint32_t glibc_major_version = version.components()[0]; | 161 uint32_t glibc_major_version = version.components()[0]; |
162 uint32_t glibc_minor_version = version.components()[1]; | 162 uint32_t glibc_minor_version = version.components()[1]; |
163 if (glibc_major_version == 2) { | 163 if (glibc_major_version == 2) { |
164 // A constant to translate glibc 2.x minor versions to their | 164 // A constant to translate glibc 2.x minor versions to their |
165 // equivalent UMALinuxGlibcVersion values. | 165 // equivalent UMALinuxGlibcVersion values. |
166 const int kGlibcMinorVersionTranslationOffset = 11 - UMA_LINUX_GLIBC_2_11; | 166 const int kGlibcMinorVersionTranslationOffset = 11 - UMA_LINUX_GLIBC_2_11; |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 } | 375 } |
376 } | 376 } |
377 | 377 |
378 namespace chrome { | 378 namespace chrome { |
379 | 379 |
380 void AddMetricsExtraParts(ChromeBrowserMainParts* main_parts) { | 380 void AddMetricsExtraParts(ChromeBrowserMainParts* main_parts) { |
381 main_parts->AddParts(new ChromeBrowserMainExtraPartsMetrics()); | 381 main_parts->AddParts(new ChromeBrowserMainExtraPartsMetrics()); |
382 } | 382 } |
383 | 383 |
384 } // namespace chrome | 384 } // namespace chrome |
OLD | NEW |