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

Unified Diff: chromecast/browser/metrics/cast_metrics_service_client.cc

Issue 721393002: Disable GpuMetricsProvider if GPU is disabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/browser/metrics/cast_metrics_service_client.cc
diff --git a/chromecast/browser/metrics/cast_metrics_service_client.cc b/chromecast/browser/metrics/cast_metrics_service_client.cc
index feb0fa6022ce0a5f08b29e00b7aadc4413b560e2..d6edb3ffb083ac620a89f0168c93fc2a6d576eac 100644
--- a/chromecast/browser/metrics/cast_metrics_service_client.cc
+++ b/chromecast/browser/metrics/cast_metrics_service_client.cc
@@ -18,6 +18,7 @@
#include "components/metrics/net/net_metrics_log_uploader.h"
#include "components/metrics/net/network_metrics_provider.h"
#include "components/metrics/profiler/profiler_metrics_provider.h"
+#include "content/public/common/content_switches.h"
#if defined(OS_LINUX)
#include "chromecast/browser/metrics/external_metrics.h"
@@ -160,9 +161,13 @@ CastMetricsServiceClient::CastMetricsServiceClient(
new CastStabilityMetricsProvider(metrics_service_.get());
metrics_service_->RegisterMetricsProvider(
scoped_ptr< ::metrics::MetricsProvider>(stability_provider));
- metrics_service_->RegisterMetricsProvider(
- scoped_ptr< ::metrics::MetricsProvider>(
- new ::metrics::GPUMetricsProvider));
+
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+ if (!command_line->HasSwitch(switches::kDisableGpu)) {
+ metrics_service_->RegisterMetricsProvider(
+ scoped_ptr< ::metrics::MetricsProvider>(
+ new ::metrics::GPUMetricsProvider));
+ }
metrics_service_->RegisterMetricsProvider(
scoped_ptr< ::metrics::MetricsProvider>(
new ::metrics::NetworkMetricsProvider(io_task_runner)));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698