| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 void RecordDefaultBrowserUMAStat() { | 66 void RecordDefaultBrowserUMAStat() { |
| 67 // Record whether Chrome is the default browser or not. | 67 // Record whether Chrome is the default browser or not. |
| 68 ShellIntegration::DefaultWebClientState default_state = | 68 ShellIntegration::DefaultWebClientState default_state = |
| 69 ShellIntegration::GetDefaultBrowser(); | 69 ShellIntegration::GetDefaultBrowser(); |
| 70 UMA_HISTOGRAM_ENUMERATION("DefaultBrowser.State", default_state, | 70 UMA_HISTOGRAM_ENUMERATION("DefaultBrowser.State", default_state, |
| 71 ShellIntegration::NUM_DEFAULT_STATES); | 71 ShellIntegration::NUM_DEFAULT_STATES); |
| 72 } | 72 } |
| 73 | 73 |
| 74 void RecordLinuxGlibcVersion() { | 74 void RecordLinuxGlibcVersion() { |
| 75 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 75 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 76 base::Version version(gnu_get_libc_version()); | 76 Version version(gnu_get_libc_version()); |
| 77 | 77 |
| 78 UMALinuxGlibcVersion glibc_version_result = UMA_LINUX_GLIBC_NOT_PARSEABLE; | 78 UMALinuxGlibcVersion glibc_version_result = UMA_LINUX_GLIBC_NOT_PARSEABLE; |
| 79 if (version.IsValid() && version.components().size() == 2) { | 79 if (version.IsValid() && version.components().size() == 2) { |
| 80 glibc_version_result = UMA_LINUX_GLIBC_UNKNOWN; | 80 glibc_version_result = UMA_LINUX_GLIBC_UNKNOWN; |
| 81 int glibc_major_version = version.components()[0]; | 81 int glibc_major_version = version.components()[0]; |
| 82 int glibc_minor_version = version.components()[1]; | 82 int glibc_minor_version = version.components()[1]; |
| 83 if (glibc_major_version == 2) { | 83 if (glibc_major_version == 2) { |
| 84 // A constant to translate glibc 2.x minor versions to their | 84 // A constant to translate glibc 2.x minor versions to their |
| 85 // equivalent UMALinuxGlibcVersion values. | 85 // equivalent UMALinuxGlibcVersion values. |
| 86 const int kGlibcMinorVersionTranslationOffset = 11 - UMA_LINUX_GLIBC_2_11; | 86 const int kGlibcMinorVersionTranslationOffset = 11 - UMA_LINUX_GLIBC_2_11; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 RecordTouchEventState(); | 152 RecordTouchEventState(); |
| 153 } | 153 } |
| 154 | 154 |
| 155 namespace chrome { | 155 namespace chrome { |
| 156 | 156 |
| 157 void AddMetricsExtraParts(ChromeBrowserMainParts* main_parts) { | 157 void AddMetricsExtraParts(ChromeBrowserMainParts* main_parts) { |
| 158 main_parts->AddParts(new ChromeBrowserMainExtraPartsMetrics()); | 158 main_parts->AddParts(new ChromeBrowserMainExtraPartsMetrics()); |
| 159 } | 159 } |
| 160 | 160 |
| 161 } // namespace chrome | 161 } // namespace chrome |
| OLD | NEW |