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

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

Issue 636363004: Make remaining parts of components/metrics use metrics namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix cros compile 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
« no previous file with comments | « no previous file | chromecast/browser/metrics/cast_metrics_service_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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)
OLDNEW
« no previous file with comments | « no previous file | chromecast/browser/metrics/cast_metrics_service_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698