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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
265 ChromeMetricsServiceClient::CreateUploader( | 265 ChromeMetricsServiceClient::CreateUploader( |
266 const std::string& server_url, | 266 const std::string& server_url, |
267 const std::string& mime_type, | 267 const std::string& mime_type, |
268 const base::Callback<void(int)>& on_upload_complete) { | 268 const base::Callback<void(int)>& on_upload_complete) { |
269 return scoped_ptr<metrics::MetricsLogUploader>( | 269 return scoped_ptr<metrics::MetricsLogUploader>( |
270 new metrics::NetMetricsLogUploader( | 270 new metrics::NetMetricsLogUploader( |
271 g_browser_process->system_request_context(), server_url, mime_type, | 271 g_browser_process->system_request_context(), server_url, mime_type, |
272 on_upload_complete)); | 272 on_upload_complete)); |
273 } | 273 } |
274 | 274 |
275 #if defined(OS_WIN) | |
276 base::string16 ChromeMetricsServiceClient::GetRegistryBackupKey() { | |
277 return L"Software\\" PRODUCT_STRING_PATH L"\\StabilityMetrics"; | |
Alexei Svitkine (slow)
2014/09/11 15:23:28
Hmm, where is PRODUCT_STRING_PATH defined? In cs.c
erikwright (departed)
2014/09/11 15:39:14
See https://codereview.chromium.org/558713002/ whi
| |
278 } | |
279 #endif | |
280 | |
275 void ChromeMetricsServiceClient::LogPluginLoadingError( | 281 void ChromeMetricsServiceClient::LogPluginLoadingError( |
276 const base::FilePath& plugin_path) { | 282 const base::FilePath& plugin_path) { |
277 #if defined(ENABLE_PLUGINS) | 283 #if defined(ENABLE_PLUGINS) |
278 plugin_metrics_provider_->LogPluginLoadingError(plugin_path); | 284 plugin_metrics_provider_->LogPluginLoadingError(plugin_path); |
279 #else | 285 #else |
280 NOTREACHED(); | 286 NOTREACHED(); |
281 #endif // defined(ENABLE_PLUGINS) | 287 #endif // defined(ENABLE_PLUGINS) |
282 } | 288 } |
283 | 289 |
284 void ChromeMetricsServiceClient::Initialize() { | 290 void ChromeMetricsServiceClient::Initialize() { |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
545 // Capture the histogram samples. | 551 // Capture the histogram samples. |
546 if (dumps_with_crash != 0) | 552 if (dumps_with_crash != 0) |
547 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithCrash", dumps_with_crash); | 553 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithCrash", dumps_with_crash); |
548 if (dumps_with_no_crash != 0) | 554 if (dumps_with_no_crash != 0) |
549 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithNoCrash", dumps_with_no_crash); | 555 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithNoCrash", dumps_with_no_crash); |
550 int total_dumps = dumps_with_crash + dumps_with_no_crash; | 556 int total_dumps = dumps_with_crash + dumps_with_no_crash; |
551 if (total_dumps != 0) | 557 if (total_dumps != 0) |
552 UMA_HISTOGRAM_COUNTS("Chrome.BrowserCrashDumpAttempts", total_dumps); | 558 UMA_HISTOGRAM_COUNTS("Chrome.BrowserCrashDumpAttempts", total_dumps); |
553 } | 559 } |
554 #endif // defined(OS_WIN) | 560 #endif // defined(OS_WIN) |
OLD | NEW |