OLD | NEW |
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 Loading... |
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 Loading... |
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) |
OLD | NEW |