Chromium Code Reviews| 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, |