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

Unified Diff: components/spellcheck/browser/spellchecker_session_bridge_android.cc

Issue 2457873002: [Android] spellcheck: add latency UMA. (Closed)
Patch Set: Created 4 years, 2 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: components/spellcheck/browser/spellchecker_session_bridge_android.cc
diff --git a/components/spellcheck/browser/spellchecker_session_bridge_android.cc b/components/spellcheck/browser/spellchecker_session_bridge_android.cc
index 5c2644f8ecc3c85e211fd8aa0f4081aec66651df..3a21fe0275f2261530815cf0b9ef570c77e5eef5 100644
--- a/components/spellcheck/browser/spellchecker_session_bridge_android.cc
+++ b/components/spellcheck/browser/spellchecker_session_bridge_android.cc
@@ -9,6 +9,8 @@
#include "base/android/jni_array.h"
#include "base/android/jni_string.h"
+#include "base/metrics/histogram_macros.h"
+#include "base/time/time.h"
#include "components/spellcheck/common/spellcheck_messages.h"
#include "components/spellcheck/common/spellcheck_result.h"
#include "content/public/browser/browser_thread.h"
@@ -122,6 +124,16 @@ void SpellCheckerSessionBridge::DisconnectSession() {
}
}
+void SpellCheckerSessionBridge::RecordLatencyUMA(
+ JNIEnv* env,
+ const JavaParamRef<jobject>& jobj,
+ long latencyMs) {
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
+ DCHECK(latencyMs >= 0);
+ UMA_HISTOGRAM_TIMES("SpellCheck.Android.Latency",
+ base::TimeDelta::FromMilliseconds(latencyMs));
Ilya Sherman 2016/10/28 18:53:54 Hmm, why are you adding a native call for recordin
timvolodine 2016/11/01 17:14:23 yeey it does! (didn't realize it is available now,
+}
+
SpellCheckerSessionBridge::SpellingRequest::SpellingRequest(
int route_id,
int identifier,

Powered by Google App Engine
This is Rietveld 408576698