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

Issue 1275813002: Implemented typo recognition in Chrome for Android. (Closed)

Created:
5 years, 4 months ago by dylanking
Modified:
5 years, 4 months ago
CC:
chromium-reviews, groby+spellwatch_chromium.org, rlp+watch_chromium.org, rouslan+spellwatch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@4_remove_mac_redundancies
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implemented typo recognition in Chrome for Android. IPCs from the renderer arrive at the message filter, which then calls into the native SpellCheckerSessionBridge. Native SpellCheckerSessionBridge handles caching of requests that come in while another request is busy. Requests are sent to SpellCheckerSessionBridge.java through JNI in order to be spellchecked. This will also be where suggestions are generated in the future. Spellcheck typo results are then sent back to native, which then sends them via IPC to the renderer. Design Doc: https://docs.google.com/document/d/1JQscDy-Vr4roGHbD0vRSiB9Zbl8pLpsbBMMsHffr9LE/edit# BUG=415302 Committed: https://crrev.com/82c859eb3f9b56c35846f7e44e4f3aad94075ec4 Cr-Commit-Position: refs/heads/master@{#343962}

Patch Set 1 #

Total comments: 20

Patch Set 2 : Update to implementation and style #

Patch Set 3 : Changed implementation to hide android details from generic header #

Patch Set 4 : Cleanup & Rebase #

Patch Set 5 : More cleanup & rebase #

Patch Set 6 : Removed unused variables from past implementation approach #

Total comments: 36

Patch Set 7 : Uploading for rouslan@ to take a look at forward declaration issue, addressed some comments #

Patch Set 8 : Addressed the rest of rouslan@'s comments. #

Patch Set 9 : Changed spellchecker to pull locale from system settings instead of always English #

Patch Set 10 : Added a clarifying comment about Locale to the java file #

Total comments: 44

Patch Set 11 : Uploading for rouslan@ to take a look at spellchecker_session_bridge.cc crash #

Patch Set 12 : Changed pending requests to be handled in native, other comment addressing #

Total comments: 20

Patch Set 13 : Rebase #

Patch Set 14 : Registered with JNI, addressed newt@'s comments. #

Total comments: 2

Patch Set 15 : Now using scoped_ptr #

Total comments: 2

Patch Set 16 : Now using implicit bool conversion of scoped_ptr's #

Patch Set 17 : #ifdef declaration in message filter to have mac compile #

Total comments: 29

Patch Set 18 : Several style changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+300 lines, -8 lines) Patch
A chrome/android/java/src/org/chromium/chrome/browser/spellchecker/SpellCheckerSessionBridge.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +115 lines, -0 lines 0 comments Download
M chrome/browser/android/chrome_jni_registrar.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/spellchecker/spellcheck_message_filter_platform.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/spellchecker/spellcheck_message_filter_platform_android.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +23 lines, -6 lines 0 comments Download
A chrome/browser/spellchecker/spellchecker_session_bridge_android.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +57 lines, -0 lines 0 comments Download
A chrome/browser/spellchecker/spellchecker_session_bridge_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +91 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 33 (6 generated)
dylanking
Still might use some cleanup. Note that the feature isn't being gated yet. Will land ...
5 years, 4 months ago (2015-08-06 03:33:58 UTC) #2
please use gerrit instead
https://codereview.chromium.org/1275813002/diff/1/chrome/browser/spellchecker/spellcheck_message_filter_platform.h File chrome/browser/spellchecker/spellcheck_message_filter_platform.h (right): https://codereview.chromium.org/1275813002/diff/1/chrome/browser/spellchecker/spellcheck_message_filter_platform.h#newcode1 chrome/browser/spellchecker/spellcheck_message_filter_platform.h:1: // Copyright (c) 2012 The Chromium Authors. All rights ...
5 years, 4 months ago (2015-08-06 16:58:29 UTC) #3
groby-ooo-7-16
drive-by https://codereview.chromium.org/1275813002/diff/1/chrome/browser/spellchecker/spellcheck_message_filter_platform_android.cc File chrome/browser/spellchecker/spellcheck_message_filter_platform_android.cc (right): https://codereview.chromium.org/1275813002/diff/1/chrome/browser/spellchecker/spellcheck_message_filter_platform_android.cc#newcode87 chrome/browser/spellchecker/spellcheck_message_filter_platform_android.cc:87: No empty line, please https://codereview.chromium.org/1275813002/diff/1/chrome/browser/spellchecker/spellcheck_message_filter_platform_android.cc#newcode100 chrome/browser/spellchecker/spellcheck_message_filter_platform_android.cc:100: bool SpellCheckMessageFilterPlatform::RegisterSpellCheckMessageFilterPlatform(JNIEnv* ...
5 years, 4 months ago (2015-08-06 22:10:08 UTC) #4
dylanking
Yeah, sorry guys, this wasn't stylistically ready for review. Was just uploaded so rouslan@ could ...
5 years, 4 months ago (2015-08-06 22:13:14 UTC) #5
dylanking
Addressed several comments and also updated the implementation to hopefully not miss requests. Still need ...
5 years, 4 months ago (2015-08-07 03:33:54 UTC) #7
dylanking
On 2015/08/06 at 16:58:28, Rouslan wrote: > Let's not put anything java-specific or android-specific into ...
5 years, 4 months ago (2015-08-11 01:54:54 UTC) #8
please use gerrit instead
Looks promising! https://codereview.chromium.org/1275813002/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/spellchecker/SpellCheckerSessionBridge.java File chrome/android/java/src/org/chromium/chrome/browser/spellchecker/SpellCheckerSessionBridge.java (right): https://codereview.chromium.org/1275813002/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/spellchecker/SpellCheckerSessionBridge.java#newcode53 chrome/android/java/src/org/chromium/chrome/browser/spellchecker/SpellCheckerSessionBridge.java:53: System.out.println("DYLANKING Setting Pending Text To: " + ...
5 years, 4 months ago (2015-08-11 16:43:47 UTC) #9
dylanking
https://codereview.chromium.org/1275813002/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/spellchecker/SpellCheckerSessionBridge.java File chrome/android/java/src/org/chromium/chrome/browser/spellchecker/SpellCheckerSessionBridge.java (right): https://codereview.chromium.org/1275813002/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/spellchecker/SpellCheckerSessionBridge.java#newcode53 chrome/android/java/src/org/chromium/chrome/browser/spellchecker/SpellCheckerSessionBridge.java:53: System.out.println("DYLANKING Setting Pending Text To: " + text); Don't ...
5 years, 4 months ago (2015-08-12 00:16:27 UTC) #11
dylanking
+rouslan@ for owners review of *.cc/*.h +newt@ for owners review of SpellCheckerSessionBridge.java https://codereview.chromium.org/1275813002/diff/100001/chrome/browser/spellchecker/spellcheck_message_filter_platform.h File chrome/browser/spellchecker/spellcheck_message_filter_platform.h ...
5 years, 4 months ago (2015-08-12 01:29:55 UTC) #13
newt (away)
I looked at the Java and C++ sides of SpellCheckerSessionBridge. Overall structure looks good, just ...
5 years, 4 months ago (2015-08-12 16:12:58 UTC) #14
please use gerrit instead
https://codereview.chromium.org/1275813002/diff/180001/chrome/browser/spellchecker/spellcheck_message_filter_platform_android.cc File chrome/browser/spellchecker/spellcheck_message_filter_platform_android.cc (right): https://codereview.chromium.org/1275813002/diff/180001/chrome/browser/spellchecker/spellcheck_message_filter_platform_android.cc#newcode39 chrome/browser/spellchecker/spellcheck_message_filter_platform_android.cc:39: const std::vector<SpellCheckResult>& local_results) { NOTREACHED(); https://codereview.chromium.org/1275813002/diff/180001/chrome/browser/spellchecker/spellcheck_message_filter_platform_android.cc#newcode47 chrome/browser/spellchecker/spellcheck_message_filter_platform_android.cc:47: bool* correct) ...
5 years, 4 months ago (2015-08-12 17:05:54 UTC) #15
newt (away)
https://codereview.chromium.org/1275813002/diff/180001/chrome/browser/spellchecker/spellchecker_session_bridge_android.h File chrome/browser/spellchecker/spellchecker_session_bridge_android.h (right): https://codereview.chromium.org/1275813002/diff/180001/chrome/browser/spellchecker/spellchecker_session_bridge_android.h#newcode22 chrome/browser/spellchecker/spellchecker_session_bridge_android.h:22: static bool RegisterSpellCheckerSessionBridge(JNIEnv* env); On 2015/08/12 17:05:54, Rouslan wrote: ...
5 years, 4 months ago (2015-08-12 20:08:36 UTC) #16
dylanking
https://codereview.chromium.org/1275813002/diff/180001/chrome/android/java/src/org/chromium/chrome/browser/spellchecker/SpellCheckerSessionBridge.java File chrome/android/java/src/org/chromium/chrome/browser/spellchecker/SpellCheckerSessionBridge.java (right): https://codereview.chromium.org/1275813002/diff/180001/chrome/android/java/src/org/chromium/chrome/browser/spellchecker/SpellCheckerSessionBridge.java#newcode22 chrome/android/java/src/org/chromium/chrome/browser/spellchecker/SpellCheckerSessionBridge.java:22: public class SpellCheckerSessionBridge implements SpellCheckerSession.SpellCheckerSessionListener { Agreed, done. https://codereview.chromium.org/1275813002/diff/180001/chrome/android/java/src/org/chromium/chrome/browser/spellchecker/SpellCheckerSessionBridge.java#newcode23 ...
5 years, 4 months ago (2015-08-13 02:10:03 UTC) #17
dylanking
NOTE: Bad upstream target was set with the latest patch, will fix. On 2015/08/13 at ...
5 years, 4 months ago (2015-08-13 02:10:48 UTC) #18
newt (away)
Also, please elaborate a bit in the commit message. The commit message should give a ...
5 years, 4 months ago (2015-08-13 20:40:32 UTC) #19
dylanking
Will make the patch description more elaborate tomorrow! https://codereview.chromium.org/1275813002/diff/220001/chrome/android/java/src/org/chromium/chrome/browser/spellchecker/SpellCheckerSessionBridge.java File chrome/android/java/src/org/chromium/chrome/browser/spellchecker/SpellCheckerSessionBridge.java (right): https://codereview.chromium.org/1275813002/diff/220001/chrome/android/java/src/org/chromium/chrome/browser/spellchecker/SpellCheckerSessionBridge.java#newcode44 chrome/android/java/src/org/chromium/chrome/browser/spellchecker/SpellCheckerSessionBridge.java:44: return ...
5 years, 4 months ago (2015-08-14 02:57:03 UTC) #20
please use gerrit instead
https://codereview.chromium.org/1275813002/diff/220001/chrome/browser/spellchecker/spellchecker_session_bridge_android.h File chrome/browser/spellchecker/spellchecker_session_bridge_android.h (right): https://codereview.chromium.org/1275813002/diff/220001/chrome/browser/spellchecker/spellchecker_session_bridge_android.h#newcode55 chrome/browser/spellchecker/spellchecker_session_bridge_android.h:55: bool is_active_request_; On 2015/08/14 02:57:03, dylanking wrote: > rouslan@ ...
5 years, 4 months ago (2015-08-14 17:06:23 UTC) #21
newt (away)
Looks good. Just waiting on scoped_ptrs. https://codereview.chromium.org/1275813002/diff/250001/chrome/android/java/src/org/chromium/chrome/browser/spellchecker/SpellCheckerSessionBridge.java File chrome/android/java/src/org/chromium/chrome/browser/spellchecker/SpellCheckerSessionBridge.java (right): https://codereview.chromium.org/1275813002/diff/250001/chrome/android/java/src/org/chromium/chrome/browser/spellchecker/SpellCheckerSessionBridge.java#newcode43 chrome/android/java/src/org/chromium/chrome/browser/spellchecker/SpellCheckerSessionBridge.java:43: private static SpellCheckerSessionBridge ...
5 years, 4 months ago (2015-08-14 17:18:33 UTC) #22
dylanking
https://codereview.chromium.org/1275813002/diff/250001/chrome/android/java/src/org/chromium/chrome/browser/spellchecker/SpellCheckerSessionBridge.java File chrome/android/java/src/org/chromium/chrome/browser/spellchecker/SpellCheckerSessionBridge.java (right): https://codereview.chromium.org/1275813002/diff/250001/chrome/android/java/src/org/chromium/chrome/browser/spellchecker/SpellCheckerSessionBridge.java#newcode43 chrome/android/java/src/org/chromium/chrome/browser/spellchecker/SpellCheckerSessionBridge.java:43: private static SpellCheckerSessionBridge create(long nativeSpellCheckerSessionBridge) { Gotcha. This will ...
5 years, 4 months ago (2015-08-14 22:22:56 UTC) #23
newt (away)
lgtm from my end! https://codereview.chromium.org/1275813002/diff/270001/chrome/browser/spellchecker/spellchecker_session_bridge_android.cc File chrome/browser/spellchecker/spellchecker_session_bridge_android.cc (right): https://codereview.chromium.org/1275813002/diff/270001/chrome/browser/spellchecker/spellchecker_session_bridge_android.cc#newcode43 chrome/browser/spellchecker/spellchecker_session_bridge_android.cc:43: if (active_request_.get()) { I believe ...
5 years, 4 months ago (2015-08-14 22:32:07 UTC) #24
dylanking
https://codereview.chromium.org/1275813002/diff/270001/chrome/browser/spellchecker/spellchecker_session_bridge_android.cc File chrome/browser/spellchecker/spellchecker_session_bridge_android.cc (right): https://codereview.chromium.org/1275813002/diff/270001/chrome/browser/spellchecker/spellchecker_session_bridge_android.cc#newcode43 chrome/browser/spellchecker/spellchecker_session_bridge_android.cc:43: if (active_request_.get()) { Cool, just verified that. Changed.
5 years, 4 months ago (2015-08-14 22:41:46 UTC) #25
please use gerrit instead
The first line of the description should be a single line at at most 64 ...
5 years, 4 months ago (2015-08-17 21:29:46 UTC) #26
dylanking
https://codereview.chromium.org/1275813002/diff/310001/chrome/android/java/src/org/chromium/chrome/browser/spellchecker/SpellCheckerSessionBridge.java File chrome/android/java/src/org/chromium/chrome/browser/spellchecker/SpellCheckerSessionBridge.java (right): https://codereview.chromium.org/1275813002/diff/310001/chrome/android/java/src/org/chromium/chrome/browser/spellchecker/SpellCheckerSessionBridge.java#newcode21 chrome/android/java/src/org/chromium/chrome/browser/spellchecker/SpellCheckerSessionBridge.java:21: * JNI interface for native SpellCheckerSessionBridge to use Android's ...
5 years, 4 months ago (2015-08-18 01:21:31 UTC) #27
please use gerrit instead
lgtm
5 years, 4 months ago (2015-08-18 16:48:13 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1275813002/330001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1275813002/330001
5 years, 4 months ago (2015-08-18 17:21:42 UTC) #31
commit-bot: I haz the power
Committed patchset #18 (id:330001)
5 years, 4 months ago (2015-08-18 17:58:13 UTC) #32
commit-bot: I haz the power
5 years, 4 months ago (2015-08-18 17:59:13 UTC) #33
Message was sent while issue was closed.
Patchset 18 (id:??) landed as
https://crrev.com/82c859eb3f9b56c35846f7e44e4f3aad94075ec4
Cr-Commit-Position: refs/heads/master@{#343962}

Powered by Google App Engine
This is Rietveld 408576698