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

Side by Side Diff: chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc

Issue 100543005: Update all users of base::Version to explicitly specify the namespace, and clean up the header. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: someday it will work Created 6 years, 12 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 | Annotate | Revision Log
OLDNEW
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
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 Version version(gnu_get_libc_version()); 76 base::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
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
OLDNEW
« no previous file with comments | « chrome/browser/hang_monitor/hung_plugin_action.cc ('k') | chrome/browser/net/crl_set_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698