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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/input/InputMethodUma.java

Issue 1278593004: Introduce ThreadedInputConnection behind a switch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed ImeTest#testDoesNotHang_rendererCrashes which does not test anything Created 4 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 side-by-side diff with in-line comments
Download patch
Index: content/public/android/java/src/org/chromium/content/browser/input/InputMethodUma.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/InputMethodUma.java b/content/public/android/java/src/org/chromium/content/browser/input/InputMethodUma.java
new file mode 100644
index 0000000000000000000000000000000000000000..c43f5a797f67714ddc142aea97b54744bfadfabe
--- /dev/null
+++ b/content/public/android/java/src/org/chromium/content/browser/input/InputMethodUma.java
@@ -0,0 +1,41 @@
+// Copyright 2016 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.content.browser.input;
+
+import org.chromium.base.metrics.RecordHistogram;
+
+/**
+ * A class to record various input method UMAs.
+ */
+class InputMethodUma {
+ // Note that these values should be cross-checked against
+ // tools/metrics/histograms/histograms.xml.
+ private static final String UMA_REGISTER_PROXYVIEW = "InputMethod.RegisterProxyView";
+ private static final int UMA_PROXYVIEW_SUCCESS = 0;
+ private static final int UMA_PROXYVIEW_FAILURE = 1;
+ private static final int UMA_PROXYVIEW_DETECTION_FAILURE = 2;
+ private static final int UMA_PROXYVIEW_REPLICA_INPUT_CONNECTION = 3;
+ private static final int UMA_PROXYVIEW_COUNT = 4;
+
+ void recordProxyViewSuccess() {
+ RecordHistogram.recordEnumeratedHistogram(
+ UMA_REGISTER_PROXYVIEW, UMA_PROXYVIEW_SUCCESS, UMA_PROXYVIEW_COUNT);
+ }
+
+ void recordProxyViewFailure() {
+ RecordHistogram.recordEnumeratedHistogram(
+ UMA_REGISTER_PROXYVIEW, UMA_PROXYVIEW_FAILURE, UMA_PROXYVIEW_COUNT);
+ }
+
+ void recordProxyViewDetectionFailure() {
+ RecordHistogram.recordEnumeratedHistogram(
+ UMA_REGISTER_PROXYVIEW, UMA_PROXYVIEW_DETECTION_FAILURE, UMA_PROXYVIEW_COUNT);
+ }
+
+ void recordProxyViewReplicaInputConnection() {
+ RecordHistogram.recordEnumeratedHistogram(UMA_REGISTER_PROXYVIEW,
+ UMA_PROXYVIEW_REPLICA_INPUT_CONNECTION, UMA_PROXYVIEW_COUNT);
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698