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

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

Issue 573403002: Change UMA proto product field to be an int32. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments and add a couple of tests. Created 6 years, 2 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"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 void ChromeMetricsServiceClient::SetMetricsClientId( 173 void ChromeMetricsServiceClient::SetMetricsClientId(
174 const std::string& client_id) { 174 const std::string& client_id) {
175 crash_keys::SetCrashClientIdFromGUID(client_id); 175 crash_keys::SetCrashClientIdFromGUID(client_id);
176 } 176 }
177 177
178 bool ChromeMetricsServiceClient::IsOffTheRecordSessionActive() { 178 bool ChromeMetricsServiceClient::IsOffTheRecordSessionActive() {
179 return chrome::IsOffTheRecordSessionActive(); 179 return chrome::IsOffTheRecordSessionActive();
180 } 180 }
181 181
182 int32 ChromeMetricsServiceClient::GetProduct() {
183 return metrics::ChromeUserMetricsExtension::CHROME;
184 }
185
182 std::string ChromeMetricsServiceClient::GetApplicationLocale() { 186 std::string ChromeMetricsServiceClient::GetApplicationLocale() {
183 return g_browser_process->GetApplicationLocale(); 187 return g_browser_process->GetApplicationLocale();
184 } 188 }
185 189
186 bool ChromeMetricsServiceClient::GetBrand(std::string* brand_code) { 190 bool ChromeMetricsServiceClient::GetBrand(std::string* brand_code) {
187 return google_brand::GetBrand(brand_code); 191 return google_brand::GetBrand(brand_code);
188 } 192 }
189 193
190 metrics::SystemProfileProto::Channel ChromeMetricsServiceClient::GetChannel() { 194 metrics::SystemProfileProto::Channel ChromeMetricsServiceClient::GetChannel() {
191 return AsProtobufChannel(chrome::VersionInfo::GetChannel()); 195 return AsProtobufChannel(chrome::VersionInfo::GetChannel());
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 // Capture the histogram samples. 558 // Capture the histogram samples.
555 if (dumps_with_crash != 0) 559 if (dumps_with_crash != 0)
556 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithCrash", dumps_with_crash); 560 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithCrash", dumps_with_crash);
557 if (dumps_with_no_crash != 0) 561 if (dumps_with_no_crash != 0)
558 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithNoCrash", dumps_with_no_crash); 562 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithNoCrash", dumps_with_no_crash);
559 int total_dumps = dumps_with_crash + dumps_with_no_crash; 563 int total_dumps = dumps_with_crash + dumps_with_no_crash;
560 if (total_dumps != 0) 564 if (total_dumps != 0)
561 UMA_HISTOGRAM_COUNTS("Chrome.BrowserCrashDumpAttempts", total_dumps); 565 UMA_HISTOGRAM_COUNTS("Chrome.BrowserCrashDumpAttempts", total_dumps);
562 } 566 }
563 #endif // defined(OS_WIN) 567 #endif // defined(OS_WIN)
OLDNEW
« no previous file with comments | « chrome/browser/metrics/chrome_metrics_service_client.h ('k') | chromecast/metrics/cast_metrics_service_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698