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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 metrics_service_.reset(new metrics::MetricsService( | 287 metrics_service_.reset(new metrics::MetricsService( |
288 metrics_state_manager_, this, g_browser_process->local_state())); | 288 metrics_state_manager_, this, g_browser_process->local_state())); |
289 | 289 |
290 // Register metrics providers. | 290 // Register metrics providers. |
291 #if defined(ENABLE_EXTENSIONS) | 291 #if defined(ENABLE_EXTENSIONS) |
292 metrics_service_->RegisterMetricsProvider( | 292 metrics_service_->RegisterMetricsProvider( |
293 scoped_ptr<metrics::MetricsProvider>( | 293 scoped_ptr<metrics::MetricsProvider>( |
294 new ExtensionsMetricsProvider(metrics_state_manager_))); | 294 new ExtensionsMetricsProvider(metrics_state_manager_))); |
295 #endif | 295 #endif |
296 metrics_service_->RegisterMetricsProvider( | 296 metrics_service_->RegisterMetricsProvider( |
297 scoped_ptr<metrics::MetricsProvider>(new NetworkMetricsProvider( | 297 scoped_ptr<metrics::MetricsProvider>(new metrics::NetworkMetricsProvider( |
298 content::BrowserThread::GetBlockingPool()))); | 298 content::BrowserThread::GetBlockingPool()))); |
299 metrics_service_->RegisterMetricsProvider( | 299 metrics_service_->RegisterMetricsProvider( |
300 scoped_ptr<metrics::MetricsProvider>(new OmniboxMetricsProvider)); | 300 scoped_ptr<metrics::MetricsProvider>(new OmniboxMetricsProvider)); |
301 metrics_service_->RegisterMetricsProvider( | 301 metrics_service_->RegisterMetricsProvider( |
302 scoped_ptr<metrics::MetricsProvider>(new ChromeStabilityMetricsProvider)); | 302 scoped_ptr<metrics::MetricsProvider>(new ChromeStabilityMetricsProvider)); |
303 metrics_service_->RegisterMetricsProvider( | 303 metrics_service_->RegisterMetricsProvider( |
304 scoped_ptr<metrics::MetricsProvider>(new metrics::GPUMetricsProvider())); | 304 scoped_ptr<metrics::MetricsProvider>(new metrics::GPUMetricsProvider())); |
305 profiler_metrics_provider_ = new metrics::ProfilerMetricsProvider; | 305 profiler_metrics_provider_ = new metrics::ProfilerMetricsProvider; |
306 metrics_service_->RegisterMetricsProvider( | 306 metrics_service_->RegisterMetricsProvider( |
307 scoped_ptr<metrics::MetricsProvider>(profiler_metrics_provider_)); | 307 scoped_ptr<metrics::MetricsProvider>(profiler_metrics_provider_)); |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 // Capture the histogram samples. | 547 // Capture the histogram samples. |
548 if (dumps_with_crash != 0) | 548 if (dumps_with_crash != 0) |
549 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithCrash", dumps_with_crash); | 549 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithCrash", dumps_with_crash); |
550 if (dumps_with_no_crash != 0) | 550 if (dumps_with_no_crash != 0) |
551 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithNoCrash", dumps_with_no_crash); | 551 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithNoCrash", dumps_with_no_crash); |
552 int total_dumps = dumps_with_crash + dumps_with_no_crash; | 552 int total_dumps = dumps_with_crash + dumps_with_no_crash; |
553 if (total_dumps != 0) | 553 if (total_dumps != 0) |
554 UMA_HISTOGRAM_COUNTS("Chrome.BrowserCrashDumpAttempts", total_dumps); | 554 UMA_HISTOGRAM_COUNTS("Chrome.BrowserCrashDumpAttempts", total_dumps); |
555 } | 555 } |
556 #endif // defined(OS_WIN) | 556 #endif // defined(OS_WIN) |
OLD | NEW |