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

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

Issue 922383003: Enable UMA log uploads for cellular networks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments fixed Created 5 years, 10 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 | components/metrics/metrics_reporting_scheduler.h » ('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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 void ChromeMetricsServiceClient::Initialize() { 265 void ChromeMetricsServiceClient::Initialize() {
266 metrics_service_.reset(new metrics::MetricsService( 266 metrics_service_.reset(new metrics::MetricsService(
267 metrics_state_manager_, this, g_browser_process->local_state())); 267 metrics_state_manager_, this, g_browser_process->local_state()));
268 268
269 // Register metrics providers. 269 // Register metrics providers.
270 #if defined(ENABLE_EXTENSIONS) 270 #if defined(ENABLE_EXTENSIONS)
271 metrics_service_->RegisterMetricsProvider( 271 metrics_service_->RegisterMetricsProvider(
272 scoped_ptr<metrics::MetricsProvider>( 272 scoped_ptr<metrics::MetricsProvider>(
273 new ExtensionsMetricsProvider(metrics_state_manager_))); 273 new ExtensionsMetricsProvider(metrics_state_manager_)));
274 #endif 274 #endif
275 metrics_service_->RegisterMetricsProvider( 275 scoped_ptr<metrics::NetworkMetricsProvider> network_metrics_provider(
276 scoped_ptr<metrics::MetricsProvider>(new metrics::NetworkMetricsProvider( 276 new metrics::NetworkMetricsProvider(
277 content::BrowserThread::GetBlockingPool()))); 277 content::BrowserThread::GetBlockingPool()));
278 metrics_service_->SetConnectionTypeCallback(
279 network_metrics_provider->GetConnectionCallback());
280 metrics_service_->RegisterMetricsProvider(network_metrics_provider.Pass());
281
278 metrics_service_->RegisterMetricsProvider( 282 metrics_service_->RegisterMetricsProvider(
279 scoped_ptr<metrics::MetricsProvider>(new OmniboxMetricsProvider)); 283 scoped_ptr<metrics::MetricsProvider>(new OmniboxMetricsProvider));
280 metrics_service_->RegisterMetricsProvider( 284 metrics_service_->RegisterMetricsProvider(
281 scoped_ptr<metrics::MetricsProvider>(new ChromeStabilityMetricsProvider)); 285 scoped_ptr<metrics::MetricsProvider>(new ChromeStabilityMetricsProvider));
282 metrics_service_->RegisterMetricsProvider( 286 metrics_service_->RegisterMetricsProvider(
283 scoped_ptr<metrics::MetricsProvider>(new metrics::GPUMetricsProvider())); 287 scoped_ptr<metrics::MetricsProvider>(new metrics::GPUMetricsProvider()));
284 profiler_metrics_provider_ = new metrics::ProfilerMetricsProvider; 288 profiler_metrics_provider_ = new metrics::ProfilerMetricsProvider;
285 metrics_service_->RegisterMetricsProvider( 289 metrics_service_->RegisterMetricsProvider(
286 scoped_ptr<metrics::MetricsProvider>(profiler_metrics_provider_)); 290 scoped_ptr<metrics::MetricsProvider>(profiler_metrics_provider_));
287 291
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 // Capture the histogram samples. 549 // Capture the histogram samples.
546 if (dumps_with_crash != 0) 550 if (dumps_with_crash != 0)
547 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithCrash", dumps_with_crash); 551 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithCrash", dumps_with_crash);
548 if (dumps_with_no_crash != 0) 552 if (dumps_with_no_crash != 0)
549 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithNoCrash", dumps_with_no_crash); 553 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithNoCrash", dumps_with_no_crash);
550 int total_dumps = dumps_with_crash + dumps_with_no_crash; 554 int total_dumps = dumps_with_crash + dumps_with_no_crash;
551 if (total_dumps != 0) 555 if (total_dumps != 0)
552 UMA_HISTOGRAM_COUNTS("Chrome.BrowserCrashDumpAttempts", total_dumps); 556 UMA_HISTOGRAM_COUNTS("Chrome.BrowserCrashDumpAttempts", total_dumps);
553 } 557 }
554 #endif // defined(OS_WIN) 558 #endif // defined(OS_WIN)
OLDNEW
« no previous file with comments | « no previous file | components/metrics/metrics_reporting_scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698