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

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

Issue 2256363002: Attempt to remove non-namespaced base::Version usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased against master. Created 4 years, 4 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
« no previous file with comments | « chrome/browser/extensions/webstore_installer.cc ('k') | chrome/browser/net/crl_set_fetcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 // Record whether Chrome is the default browser or not. 164 // Record whether Chrome is the default browser or not.
165 shell_integration::DefaultWebClientState default_state = 165 shell_integration::DefaultWebClientState default_state =
166 shell_integration::GetDefaultBrowser(); 166 shell_integration::GetDefaultBrowser();
167 UMA_HISTOGRAM_ENUMERATION("DefaultBrowser.State", default_state, 167 UMA_HISTOGRAM_ENUMERATION("DefaultBrowser.State", default_state,
168 shell_integration::NUM_DEFAULT_STATES); 168 shell_integration::NUM_DEFAULT_STATES);
169 } 169 }
170 170
171 void RecordLinuxGlibcVersion() { 171 void RecordLinuxGlibcVersion() {
172 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 172 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
173 Version version(gnu_get_libc_version()); 173 base::Version version(gnu_get_libc_version());
174 174
175 UMALinuxGlibcVersion glibc_version_result = UMA_LINUX_GLIBC_NOT_PARSEABLE; 175 UMALinuxGlibcVersion glibc_version_result = UMA_LINUX_GLIBC_NOT_PARSEABLE;
176 if (version.IsValid() && version.components().size() == 2) { 176 if (version.IsValid() && version.components().size() == 2) {
177 glibc_version_result = UMA_LINUX_GLIBC_UNKNOWN; 177 glibc_version_result = UMA_LINUX_GLIBC_UNKNOWN;
178 uint32_t glibc_major_version = version.components()[0]; 178 uint32_t glibc_major_version = version.components()[0];
179 uint32_t glibc_minor_version = version.components()[1]; 179 uint32_t glibc_minor_version = version.components()[1];
180 if (glibc_major_version == 2) { 180 if (glibc_major_version == 2) {
181 // A constant to translate glibc 2.x minor versions to their 181 // A constant to translate glibc 2.x minor versions to their
182 // equivalent UMALinuxGlibcVersion values. 182 // equivalent UMALinuxGlibcVersion values.
183 const int kGlibcMinorVersionTranslationOffset = 11 - UMA_LINUX_GLIBC_2_11; 183 const int kGlibcMinorVersionTranslationOffset = 11 - UMA_LINUX_GLIBC_2_11;
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 } 394 }
395 } 395 }
396 396
397 namespace chrome { 397 namespace chrome {
398 398
399 void AddMetricsExtraParts(ChromeBrowserMainParts* main_parts) { 399 void AddMetricsExtraParts(ChromeBrowserMainParts* main_parts) {
400 main_parts->AddParts(new ChromeBrowserMainExtraPartsMetrics()); 400 main_parts->AddParts(new ChromeBrowserMainExtraPartsMetrics());
401 } 401 }
402 402
403 } // namespace chrome 403 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/extensions/webstore_installer.cc ('k') | chrome/browser/net/crl_set_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698