Index: components/spellcheck/browser/android/java/src/org/chromium/components/spellcheck/SpellCheckerSessionBridge.java |
diff --git a/components/spellcheck/browser/android/java/src/org/chromium/components/spellcheck/SpellCheckerSessionBridge.java b/components/spellcheck/browser/android/java/src/org/chromium/components/spellcheck/SpellCheckerSessionBridge.java |
index bcedb75bc3074c77a8b088216014863df548aea7..92fa3df46c198df0609c84a89a8ff235de6ae929 100644 |
--- a/components/spellcheck/browser/android/java/src/org/chromium/components/spellcheck/SpellCheckerSessionBridge.java |
+++ b/components/spellcheck/browser/android/java/src/org/chromium/components/spellcheck/SpellCheckerSessionBridge.java |
@@ -15,10 +15,8 @@ import android.view.textservice.TextServicesManager; |
import org.chromium.base.ContextUtils; |
import org.chromium.base.annotations.CalledByNative; |
-import org.chromium.base.metrics.RecordHistogram; |
import java.util.ArrayList; |
-import java.util.concurrent.TimeUnit; |
/** |
* JNI interface for native SpellCheckerSessionBridge to use Android's spellchecker. |
@@ -98,37 +96,6 @@ public class SpellCheckerSessionBridge implements SpellCheckerSessionListener { |
*/ |
@Override |
public void onGetSentenceSuggestions(SentenceSuggestionsInfo[] results) { |
- mStopMs = SystemClock.elapsedRealtime(); |
- |
- if (mNativeSpellCheckerSessionBridge == 0) { |
- return; |
- } |
- |
- ArrayList<Integer> offsets = new ArrayList<Integer>(); |
- ArrayList<Integer> lengths = new ArrayList<Integer>(); |
- |
- for (SentenceSuggestionsInfo result : results) { |
- if (result == null) { |
- // In some cases null can be returned by the selected spellchecking service, |
- // see crbug.com/651458. In this case skip to next result to avoid a |
- // NullPointerException later on. |
- continue; |
- } |
- for (int i = 0; i < result.getSuggestionsCount(); i++) { |
- // If a word looks like a typo, record its offset and length. |
- if ((result.getSuggestionsInfoAt(i).getSuggestionsAttributes() |
- & SuggestionsInfo.RESULT_ATTR_LOOKS_LIKE_TYPO) |
- == SuggestionsInfo.RESULT_ATTR_LOOKS_LIKE_TYPO) { |
- offsets.add(result.getOffsetAt(i)); |
- lengths.add(result.getLengthAt(i)); |
- } |
- } |
- } |
- nativeProcessSpellCheckResults(mNativeSpellCheckerSessionBridge, |
- convertListToArray(offsets), convertListToArray(lengths)); |
- |
- RecordHistogram.recordTimesHistogram("SpellCheck.Android.Latency", |
- mStopMs - mStartMs, TimeUnit.MILLISECONDS); |
} |
/** |