| 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 AndroidMetricsProvider::RegisterPrefs(registry); | 173 AndroidMetricsProvider::RegisterPrefs(registry); |
| 174 #endif // defined(OS_ANDROID) | 174 #endif // defined(OS_ANDROID) |
| 175 | 175 |
| 176 #if defined(ENABLE_PLUGINS) | 176 #if defined(ENABLE_PLUGINS) |
| 177 PluginMetricsProvider::RegisterPrefs(registry); | 177 PluginMetricsProvider::RegisterPrefs(registry); |
| 178 #endif // defined(ENABLE_PLUGINS) | 178 #endif // defined(ENABLE_PLUGINS) |
| 179 } | 179 } |
| 180 | 180 |
| 181 void ChromeMetricsServiceClient::SetMetricsClientId( | 181 void ChromeMetricsServiceClient::SetMetricsClientId( |
| 182 const std::string& client_id) { | 182 const std::string& client_id) { |
| 183 crash_keys::SetCrashClientIdFromGUID(client_id); | 183 crash_keys::SetMetricsClientIdFromGUID(client_id); |
| 184 } |
| 185 |
| 186 void ChromeMetricsServiceClient::OnRecordingDisabled() { |
| 187 crash_keys::ClearMetricsClientId(); |
| 184 } | 188 } |
| 185 | 189 |
| 186 bool ChromeMetricsServiceClient::IsOffTheRecordSessionActive() { | 190 bool ChromeMetricsServiceClient::IsOffTheRecordSessionActive() { |
| 187 return chrome::IsOffTheRecordSessionActive(); | 191 return chrome::IsOffTheRecordSessionActive(); |
| 188 } | 192 } |
| 189 | 193 |
| 190 int32 ChromeMetricsServiceClient::GetProduct() { | 194 int32 ChromeMetricsServiceClient::GetProduct() { |
| 191 return metrics::ChromeUserMetricsExtension::CHROME; | 195 return metrics::ChromeUserMetricsExtension::CHROME; |
| 192 } | 196 } |
| 193 | 197 |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 595 // Capture the histogram samples. | 599 // Capture the histogram samples. |
| 596 if (dumps_with_crash != 0) | 600 if (dumps_with_crash != 0) |
| 597 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithCrash", dumps_with_crash); | 601 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithCrash", dumps_with_crash); |
| 598 if (dumps_with_no_crash != 0) | 602 if (dumps_with_no_crash != 0) |
| 599 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithNoCrash", dumps_with_no_crash); | 603 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithNoCrash", dumps_with_no_crash); |
| 600 int total_dumps = dumps_with_crash + dumps_with_no_crash; | 604 int total_dumps = dumps_with_crash + dumps_with_no_crash; |
| 601 if (total_dumps != 0) | 605 if (total_dumps != 0) |
| 602 UMA_HISTOGRAM_COUNTS("Chrome.BrowserCrashDumpAttempts", total_dumps); | 606 UMA_HISTOGRAM_COUNTS("Chrome.BrowserCrashDumpAttempts", total_dumps); |
| 603 } | 607 } |
| 604 #endif // defined(OS_WIN) | 608 #endif // defined(OS_WIN) |
| OLD | NEW |