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

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

Issue 1859213002: Move the thread hop for UMA user actions from content:: to base::. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Answered Alexei and Ilya. Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
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 a6041cb60dcfa336a2651845a596cea994c165b7..e5215d63e913c8f3f900c7ccdad9d6a72e5103ef 100644
--- a/chromecast/browser/metrics/cast_metrics_service_client.cc
+++ b/chromecast/browser/metrics/cast_metrics_service_client.cc
@@ -33,6 +33,7 @@
#include "components/metrics/url_constants.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"
+#include "content/public/browser/browser_thread.h"
#include "content/public/common/content_switches.h"
#if defined(OS_LINUX)
@@ -260,6 +261,12 @@ base::TimeDelta CastMetricsServiceClient::GetStandardUploadInterval() {
return base::TimeDelta::FromMinutes(kStandardUploadIntervalMinutes);
}
+scoped_refptr<base::SingleThreadTaskRunner>
+CastMetricsServiceClient::GetMainThreadTaskRunner() {
+ return content::BrowserThread::GetMessageLoopProxyForThread(
+ content::BrowserThread::UI);
+}
+
void CastMetricsServiceClient::EnableMetricsService(bool enabled) {
if (!task_runner_->BelongsToCurrentThread()) {
task_runner_->PostTask(

Powered by Google App Engine
This is Rietveld 408576698