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

Unified Diff: base/android/java/src/org/chromium/base/metrics/RecordUserAction.java

Issue 1647803004: Move base to DEPS (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 11 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: base/android/java/src/org/chromium/base/metrics/RecordUserAction.java
diff --git a/base/android/java/src/org/chromium/base/metrics/RecordUserAction.java b/base/android/java/src/org/chromium/base/metrics/RecordUserAction.java
deleted file mode 100644
index d7cc32c2b2f7cb42668667dead8916b7e0881c8b..0000000000000000000000000000000000000000
--- a/base/android/java/src/org/chromium/base/metrics/RecordUserAction.java
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package org.chromium.base.metrics;
-
-import org.chromium.base.JNINamespace;
-import org.chromium.base.ThreadUtils;
-
-/**
- * Java API for recording UMA actions.
- *
- * WARNINGS:
- * JNI calls are relatively costly - avoid using in performance-critical code.
- *
- * We use a script (extract_actions.py) to scan the source code and extract actions. A string
- * literal (not a variable) must be passed to record().
- */
-@JNINamespace("base::android")
-public class RecordUserAction {
- public static void record(final String action) {
- if (ThreadUtils.runningOnUiThread()) {
- nativeRecordUserAction(action);
- return;
- }
-
- ThreadUtils.runOnUiThread(new Runnable() {
- @Override
- public void run() {
- nativeRecordUserAction(action);
- }
- });
- }
-
- private static native void nativeRecordUserAction(String action);
-}

Powered by Google App Engine
This is Rietveld 408576698