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

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

Issue 316963002: Move branding information out of google_util (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for Windows Created 6 years, 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_metrics_service_client.h" 5 #include "chrome/browser/metrics/chrome_metrics_service_client.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/metrics/histogram.h" 13 #include "base/metrics/histogram.h"
14 #include "base/prefs/pref_service.h" 14 #include "base/prefs/pref_service.h"
15 #include "base/strings/string16.h" 15 #include "base/strings/string16.h"
16 #include "base/strings/string_util.h" 16 #include "base/strings/string_util.h"
17 #include "base/strings/utf_string_conversions.h" 17 #include "base/strings/utf_string_conversions.h"
18 #include "base/threading/platform_thread.h" 18 #include "base/threading/platform_thread.h"
19 #include "base/time/time.h" 19 #include "base/time/time.h"
20 #include "chrome/browser/browser_process.h" 20 #include "chrome/browser/browser_process.h"
21 #include "chrome/browser/chrome_notification_types.h" 21 #include "chrome/browser/chrome_notification_types.h"
22 #include "chrome/browser/google/google_util.h" 22 #include "chrome/browser/google/google_brand.h"
23 #include "chrome/browser/memory_details.h" 23 #include "chrome/browser/memory_details.h"
24 #include "chrome/browser/metrics/extensions_metrics_provider.h" 24 #include "chrome/browser/metrics/extensions_metrics_provider.h"
25 #include "chrome/browser/metrics/metrics_service.h" 25 #include "chrome/browser/metrics/metrics_service.h"
26 #include "chrome/browser/ui/browser_otr_state.h" 26 #include "chrome/browser/ui/browser_otr_state.h"
27 #include "chrome/common/chrome_constants.h" 27 #include "chrome/common/chrome_constants.h"
28 #include "chrome/common/chrome_switches.h" 28 #include "chrome/common/chrome_switches.h"
29 #include "chrome/common/chrome_version_info.h" 29 #include "chrome/common/chrome_version_info.h"
30 #include "chrome/common/crash_keys.h" 30 #include "chrome/common/crash_keys.h"
31 #include "chrome/common/pref_names.h" 31 #include "chrome/common/pref_names.h"
32 #include "chrome/common/render_messages.h" 32 #include "chrome/common/render_messages.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 152
153 bool ChromeMetricsServiceClient::IsOffTheRecordSessionActive() { 153 bool ChromeMetricsServiceClient::IsOffTheRecordSessionActive() {
154 return !chrome::IsOffTheRecordSessionActive(); 154 return !chrome::IsOffTheRecordSessionActive();
155 } 155 }
156 156
157 std::string ChromeMetricsServiceClient::GetApplicationLocale() { 157 std::string ChromeMetricsServiceClient::GetApplicationLocale() {
158 return g_browser_process->GetApplicationLocale(); 158 return g_browser_process->GetApplicationLocale();
159 } 159 }
160 160
161 bool ChromeMetricsServiceClient::GetBrand(std::string* brand_code) { 161 bool ChromeMetricsServiceClient::GetBrand(std::string* brand_code) {
162 return google_util::GetBrand(brand_code); 162 return google_brand::GetBrand(brand_code);
163 } 163 }
164 164
165 metrics::SystemProfileProto::Channel ChromeMetricsServiceClient::GetChannel() { 165 metrics::SystemProfileProto::Channel ChromeMetricsServiceClient::GetChannel() {
166 return AsProtobufChannel(chrome::VersionInfo::GetChannel()); 166 return AsProtobufChannel(chrome::VersionInfo::GetChannel());
167 } 167 }
168 168
169 std::string ChromeMetricsServiceClient::GetVersionString() { 169 std::string ChromeMetricsServiceClient::GetVersionString() {
170 chrome::VersionInfo version_info; 170 chrome::VersionInfo version_info;
171 if (!version_info.is_valid()) { 171 if (!version_info.is_valid()) {
172 NOTREACHED(); 172 NOTREACHED();
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 // Capture the histogram samples. 410 // Capture the histogram samples.
411 if (dumps_with_crash != 0) 411 if (dumps_with_crash != 0)
412 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithCrash", dumps_with_crash); 412 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithCrash", dumps_with_crash);
413 if (dumps_with_no_crash != 0) 413 if (dumps_with_no_crash != 0)
414 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithNoCrash", dumps_with_no_crash); 414 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithNoCrash", dumps_with_no_crash);
415 int total_dumps = dumps_with_crash + dumps_with_no_crash; 415 int total_dumps = dumps_with_crash + dumps_with_no_crash;
416 if (total_dumps != 0) 416 if (total_dumps != 0)
417 UMA_HISTOGRAM_COUNTS("Chrome.BrowserCrashDumpAttempts", total_dumps); 417 UMA_HISTOGRAM_COUNTS("Chrome.BrowserCrashDumpAttempts", total_dumps);
418 } 418 }
419 #endif // defined(OS_WIN) 419 #endif // defined(OS_WIN)
OLDNEW
« no previous file with comments | « chrome/browser/google/google_util_chromeos.cc ('k') | chrome/browser/profile_resetter/automatic_profile_resetter_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698