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

Issue 11757004: Omnibox: Add Mid-Input Matching to HistoryQuick Provider (Closed)

Created:
7 years, 11 months ago by Mark P
Modified:
7 years, 10 months ago
Reviewers:
Peter Kasting, sky
CC:
chromium-reviews, James Su, browser-components-watch_chromium.org
Visibility:
Public.

Description

Omnibox: Add Mid-Input Matching to HistoryQuick Provider The idea: Suppose I've previously visited http://www.foobar.com/~mpearson/resume.html http://www.foobar.com/~sky/resume.html http://www.foobar.com/~pkasting/resume.html http://www.foobar.com/~swedish-chef/resume.html Suppose I have http://www.foobar.com/~mpearson/resume.html in the omnibox and then highlight "~mpearson" and press delete, leaving http://www.foobar.com//resume.html in the omnibox with the cursor between the two slashes. I want to see some/all of those URLs I listed. The current behavior of HistoryQuick provider doesn't show any matches in this situation. This change remedies this issue. It also adds a field trial to enable and test this new behavior. There are some oddities that can happen by allowing the text to break at the cursor. For instance, suppose the text is google.com. This clearly matches the URL http://www.google.com/. Now suppose the user puts his cursor after the "goo" and types "gle", leaving the omnibox with googlegle.com with the cursor between the two "gle"s. This will still match http://www.google.com/, as before, because both the two terms match (google and gle.com), just in an overlapping fashion. I played around with this and it's not as surprising as it sounds. In effect, this means that if you put the cursor in the middle of a URL and "type through" the URL, the URL will always remain as a suggestion. That kind of makes some sense. BUG=163932 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=181065

Patch Set 1 #

Total comments: 6

Patch Set 2 : Actual code + Peter's comments. #

Total comments: 2

Patch Set 3 : Peter's suggestions. #

Patch Set 4 : added field trial; revised and added tests #

Patch Set 5 : actually put users in the experiment group #

Total comments: 6

Patch Set 6 : minor comment change #

Total comments: 2

Patch Set 7 : fix typo in comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+215 lines, -67 lines) Patch
M chrome/browser/autocomplete/autocomplete_field_trial.h View 1 2 3 4 5 6 1 chunk +11 lines, -0 lines 0 comments Download
M chrome/browser/autocomplete/autocomplete_field_trial.cc View 1 2 3 4 5 chunks +39 lines, -0 lines 0 comments Download
M chrome/browser/autocomplete/history_quick_provider.cc View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/history/in_memory_url_index.h View 1 2 3 4 5 1 chunk +5 lines, -2 lines 0 comments Download
M chrome/browser/history/in_memory_url_index.cc View 1 1 chunk +5 lines, -2 lines 0 comments Download
M chrome/browser/history/in_memory_url_index_unittest.cc View 1 2 3 21 chunks +116 lines, -51 lines 0 comments Download
M chrome/browser/history/url_index_private_data.h View 1 2 3 3 chunks +17 lines, -8 lines 0 comments Download
M chrome/browser/history/url_index_private_data.cc View 1 2 3 4 chunks +19 lines, -2 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
Mark P
This change currently only contains the interface-level changes and a comment update to describe what ...
7 years, 11 months ago (2013-01-04 01:47:39 UTC) #1
Peter Kasting
I don't see what one could really object to about this. https://codereview.chromium.org/11757004/diff/1/chrome/browser/history/in_memory_url_index.h File chrome/browser/history/in_memory_url_index.h (right): ...
7 years, 11 months ago (2013-01-04 20:04:32 UTC) #2
Mark P
Added actual code. (It's easy.) Still needs tests, but seems to behave as I'd want, ...
7 years, 11 months ago (2013-01-04 23:38:58 UTC) #3
Peter Kasting
https://codereview.chromium.org/11757004/diff/7001/chrome/browser/history/url_index_private_data.cc File chrome/browser/history/url_index_private_data.cc (right): https://codereview.chromium.org/11757004/diff/7001/chrome/browser/history/url_index_private_data.cc#newcode92 chrome/browser/history/url_index_private_data.cc:92: search_string.substr(0, cursor_position) + kWhitespaceUTF16 + This doesn't insert a ...
7 years, 11 months ago (2013-01-04 23:47:39 UTC) #4
Mark P
Still todo: * double-check highlighting * add unit tests * get sky@'s okay * decide ...
7 years, 11 months ago (2013-01-09 19:51:53 UTC) #5
Mark P
Hi Peter and Scott, This is now ready for a real review. I'd very much ...
7 years, 10 months ago (2013-02-06 01:21:17 UTC) #6
sky
https://codereview.chromium.org/11757004/diff/21001/chrome/browser/autocomplete/history_quick_provider.cc File chrome/browser/autocomplete/history_quick_provider.cc (right): https://codereview.chromium.org/11757004/diff/21001/chrome/browser/autocomplete/history_quick_provider.cc#newcode168 chrome/browser/autocomplete/history_quick_provider.cc:168: autocomplete_input_.cursor_position()); If the cursor position factors into the results ...
7 years, 10 months ago (2013-02-06 04:59:43 UTC) #7
Mark P
https://codereview.chromium.org/11757004/diff/21001/chrome/browser/autocomplete/history_quick_provider.cc File chrome/browser/autocomplete/history_quick_provider.cc (right): https://codereview.chromium.org/11757004/diff/21001/chrome/browser/autocomplete/history_quick_provider.cc#newcode168 chrome/browser/autocomplete/history_quick_provider.cc:168: autocomplete_input_.cursor_position()); On 2013/02/06 04:59:43, sky wrote: > If the ...
7 years, 10 months ago (2013-02-06 17:53:34 UTC) #8
sky
LGTM
7 years, 10 months ago (2013-02-06 18:13:15 UTC) #9
Peter Kasting
The "googlegle.com" case you describe seems to arise because, while we break the user's input ...
7 years, 10 months ago (2013-02-06 18:34:27 UTC) #10
Mark P
On 2013/02/06 18:34:27, Peter Kasting wrote: > The "googlegle.com" case you describe seems to arise ...
7 years, 10 months ago (2013-02-06 18:49:17 UTC) #11
Peter Kasting
OK. LGTM.
7 years, 10 months ago (2013-02-06 18:49:44 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mpearson@chromium.org/11757004/19009
7 years, 10 months ago (2013-02-06 19:41:19 UTC) #13
Mark P
By the way, thanks Scott and Peter for the prompt review! --mark
7 years, 10 months ago (2013-02-06 19:51:30 UTC) #14
commit-bot: I haz the power
7 years, 10 months ago (2013-02-06 22:22:08 UTC) #15
Message was sent while issue was closed.
Change committed as 181065

Powered by Google App Engine
This is Rietveld 408576698