OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 package org.chromium.content.browser.input; |
| 6 |
| 7 import org.chromium.base.metrics.RecordHistogram; |
| 8 |
| 9 /** |
| 10 * A class to record various input method UMAs. |
| 11 */ |
| 12 class InputMethodUma { |
| 13 // Note that these values should be cross-checked against |
| 14 // tools/metrics/histograms/histograms.xml. |
| 15 private static final String UMA_REGISTER_PROXYVIEW = "InputMethod.RegisterPr
oxyView"; |
| 16 private static final int UMA_PROXYVIEW_SUCCESS = 0; |
| 17 private static final int UMA_PROXYVIEW_FAILURE = 1; |
| 18 private static final int UMA_PROXYVIEW_DETECTION_FAILURE = 2; |
| 19 private static final int UMA_PROXYVIEW_REPLICA_INPUT_CONNECTION = 3; |
| 20 private static final int UMA_PROXYVIEW_COUNT = 4; |
| 21 |
| 22 void recordProxyViewSuccess() { |
| 23 RecordHistogram.recordEnumeratedHistogram( |
| 24 UMA_REGISTER_PROXYVIEW, UMA_PROXYVIEW_SUCCESS, UMA_PROXYVIEW_COU
NT); |
| 25 } |
| 26 |
| 27 void recordProxyViewFailure() { |
| 28 RecordHistogram.recordEnumeratedHistogram( |
| 29 UMA_REGISTER_PROXYVIEW, UMA_PROXYVIEW_FAILURE, UMA_PROXYVIEW_COU
NT); |
| 30 } |
| 31 |
| 32 void recordProxyViewDetectionFailure() { |
| 33 RecordHistogram.recordEnumeratedHistogram( |
| 34 UMA_REGISTER_PROXYVIEW, UMA_PROXYVIEW_DETECTION_FAILURE, UMA_PRO
XYVIEW_COUNT); |
| 35 } |
| 36 |
| 37 void recordProxyViewReplicaInputConnection() { |
| 38 RecordHistogram.recordEnumeratedHistogram(UMA_REGISTER_PROXYVIEW, |
| 39 UMA_PROXYVIEW_REPLICA_INPUT_CONNECTION, UMA_PROXYVIEW_COUNT); |
| 40 } |
| 41 } |
OLD | NEW |