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

Unified Diff: ios/web/user_metrics.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: Initializing in content. 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: ios/web/user_metrics.cc
diff --git a/ios/web/user_metrics.cc b/ios/web/user_metrics.cc
index b6ac484e6a7454b15aa60699725fa86625b3ecec..acb426d8487eef6dd4a546d4aa023c97e78bad48 100644
--- a/ios/web/user_metrics.cc
+++ b/ios/web/user_metrics.cc
@@ -13,23 +13,13 @@
namespace web {
+// TODO(beaudoin): Get rid of these methods now that the base:: version does
+// thread hopping. Tracked in crbug.com/601483.
void RecordAction(const base::UserMetricsAction& action) {
- if (!WebThread::CurrentlyOn(WebThread::UI)) {
- WebThread::PostTask(WebThread::UI, FROM_HERE,
- base::Bind(&web::RecordAction, action));
- return;
- }
-
base::RecordAction(action);
}
void RecordComputedAction(const std::string& action) {
- if (!WebThread::CurrentlyOn(WebThread::UI)) {
- WebThread::PostTask(WebThread::UI, FROM_HERE,
- base::Bind(&web::RecordComputedAction, action));
- return;
- }
-
base::RecordComputedAction(action);
}

Powered by Google App Engine
This is Rietveld 408576698