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

Issue 471673002: Omnibox: Prevent Asynchronous Suggestions from Changing Default Match (Closed)

Created:
6 years, 4 months ago by Mark P
Modified:
6 years, 3 months ago
Reviewers:
msw
CC:
chromium-reviews, James Su, Peter Kasting, Maria
Project:
chromium
Visibility:
Public.

Description

Omnibox: Prevent Asynchronous Suggestions from Changing Default Match Calls to the suggest server may normally result in a new inline autocompletion. This can be disruptive because it means pressing enter may bring the user to different places depending on how long he/she waits after typing the last key. This change prevents new suggestions from becoming the default match. In other words, the default match is only allowed to change on a keystroke, not due to a reply coming back from the server. The consequence of this change is that if previously we'd show an inline suggestion on a server reply, now we only show it one keystroke later. I think this trade-off (one keystroke versus inconsistent omnibox behavior) is a good one to make. We still end up with default matches (inline autocompletions within the omnibox) from the suggest server after this change. Here's an example of why: User types "facebo" We send a suggest server request. Server asynchronously returns "facebook" as a top suggestion, beating the server-provided verbatim score for "facebo". We decide not to show it within the omnibox. It's instead shown somewhere in the dropdown. User types "o". We send a suggest server request. We reuse our cached suggestions and suggestion scores. <<< THE KEY We show "facebook" as an inline suggestion because it beats the default verbatim score that gets assigned to "faceboo". (This is the score that we assign by default without having yet received the most recent suggest server response.) We receive the response, which includes "facebook" as a top suggestion, beating the server-provided verbatim score for "faceboo". We show "facebook" as an inline suggestion. i.e., we decide not to demote it because it was already being shown inline TESTED: unit tests plus interactive tests (facebook.com/l, google.com/a) BUG=398135 R=msw@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=290058

Patch Set 1 #

Patch Set 2 : more cleanup #

Patch Set 3 : more cleanup #

Patch Set 4 : more cleanup #

Patch Set 5 : add clarifying comment #

Total comments: 16

Patch Set 6 : Mike's suggestions #

Patch Set 7 : last remaining test should pass after refactor changelist is in #

Patch Set 8 : rebase #

Patch Set 9 : better resolve rebase #

Total comments: 54

Patch Set 10 : rebase on top of head, including necessary refactoring changelist #

Patch Set 11 : resolve rebase issue #

Patch Set 12 : more comment cleanup after rebasing #

Total comments: 5

Patch Set 13 : Mike's pile of comments #

Patch Set 14 : added comment by PersistInlineSuggestions() #

Total comments: 15

Patch Set 15 : retore dropped comment #

Total comments: 22

Patch Set 16 : Mike's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+528 lines, -252 lines) Patch
M chrome/browser/autocomplete/base_search_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +13 lines, -7 lines 0 comments Download
M chrome/browser/autocomplete/search_provider.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +22 lines, -13 lines 0 comments Download
M chrome/browser/autocomplete/search_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 11 chunks +111 lines, -26 lines 0 comments Download
M chrome/browser/autocomplete/search_provider_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 39 chunks +369 lines, -206 lines 0 comments Download
M components/omnibox/search_suggestion_parser.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +12 lines, -0 lines 0 comments Download
M components/omnibox/search_suggestion_parser.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
Mark P
Mike, You and Peter are the people most familiar with the "allowed to be default ...
6 years, 4 months ago (2014-08-13 19:57:13 UTC) #1
msw
"the default match is only allowed to change on a keystroke, not due to a ...
6 years, 4 months ago (2014-08-13 23:19:01 UTC) #2
Mark P
On 2014/08/13 23:19:01, msw wrote: > "the default match is only allowed to change on ...
6 years, 4 months ago (2014-08-14 00:59:45 UTC) #3
msw
Before/while I look closer at the SearchProvider::HandleReceivedResults impl and the test changes, I have some ...
6 years, 4 months ago (2014-08-14 02:57:23 UTC) #4
Mark P
On Wed, Aug 13, 2014 at 7:57 PM, <msw@chromium.org> wrote: > Before/while I look closer ...
6 years, 4 months ago (2014-08-14 03:55:24 UTC) #5
Mark P
I heavily restructured this according to your suggestions. Per your suggestion, I managed to mostly ...
6 years, 4 months ago (2014-08-15 00:05:56 UTC) #6
msw
On 2014/08/15 00:05:56, Mark P wrote: > However, with the new approach (no old and ...
6 years, 4 months ago (2014-08-15 01:04:35 UTC) #7
Mark P
On Thu, Aug 14, 2014 at 6:04 PM, <msw@chromium.org> wrote: > On 2014/08/15 00:05:56, Mark ...
6 years, 4 months ago (2014-08-15 15:39:32 UTC) #8
Mark P
I still need to test this after the refactoring changelist, but I think this changelist ...
6 years, 4 months ago (2014-08-15 19:57:56 UTC) #9
Mark P
On 2014/08/15 19:57:56, Mark P wrote: > I still need to test this after the ...
6 years, 4 months ago (2014-08-15 20:04:06 UTC) #10
Mark P
Comments to help the review. https://codereview.chromium.org/471673002/diff/160001/chrome/browser/autocomplete/search_provider.cc File chrome/browser/autocomplete/search_provider.cc (left): https://codereview.chromium.org/471673002/diff/160001/chrome/browser/autocomplete/search_provider.cc#oldcode436 chrome/browser/autocomplete/search_provider.cc:436: const TemplateURL* keyword_url = ...
6 years, 4 months ago (2014-08-15 20:04:39 UTC) #11
msw
https://codereview.chromium.org/471673002/diff/160001/chrome/browser/autocomplete/search_provider.cc File chrome/browser/autocomplete/search_provider.cc (right): https://codereview.chromium.org/471673002/diff/160001/chrome/browser/autocomplete/search_provider.cc#newcode667 chrome/browser/autocomplete/search_provider.cc:667: void SearchProvider::PersistGoodResultsForOneProvider( Why do we need this at all? ...
6 years, 4 months ago (2014-08-15 21:04:39 UTC) #12
msw
https://codereview.chromium.org/471673002/diff/220001/chrome/browser/autocomplete/base_search_provider.cc File chrome/browser/autocomplete/base_search_provider.cc (right): https://codereview.chromium.org/471673002/diff/220001/chrome/browser/autocomplete/base_search_provider.cc#newcode258 chrome/browser/autocomplete/base_search_provider.cc:258: // We only allow inlinable navsuggestions that were received ...
6 years, 4 months ago (2014-08-15 21:27:59 UTC) #13
Mark P
All updated, including both batches of your comments. I was right that all tests will ...
6 years, 4 months ago (2014-08-15 22:09:22 UTC) #14
Mark P
https://codereview.chromium.org/471673002/diff/260001/chrome/browser/autocomplete/search_provider.h File chrome/browser/autocomplete/search_provider.h (right): https://codereview.chromium.org/471673002/diff/260001/chrome/browser/autocomplete/search_provider.h#newcode215 chrome/browser/autocomplete/search_provider.h:215: // hence can remain as the inline autocompletion). All ...
6 years, 4 months ago (2014-08-15 23:01:06 UTC) #15
Mark P
On 2014/08/15 23:01:06, Mark P wrote: > https://codereview.chromium.org/471673002/diff/260001/chrome/browser/autocomplete/search_provider.h > File chrome/browser/autocomplete/search_provider.h (right): > > https://codereview.chromium.org/471673002/diff/260001/chrome/browser/autocomplete/search_provider.h#newcode215 ...
6 years, 4 months ago (2014-08-15 23:16:30 UTC) #16
msw
My biggest current worry is rotate... https://codereview.chromium.org/471673002/diff/160001/chrome/browser/autocomplete/search_provider.cc File chrome/browser/autocomplete/search_provider.cc (right): https://codereview.chromium.org/471673002/diff/160001/chrome/browser/autocomplete/search_provider.cc#newcode667 chrome/browser/autocomplete/search_provider.cc:667: void SearchProvider::PersistGoodResultsForOneProvider( On ...
6 years, 4 months ago (2014-08-15 23:31:11 UTC) #17
Mark P
https://codereview.chromium.org/471673002/diff/160001/chrome/browser/autocomplete/search_provider.cc File chrome/browser/autocomplete/search_provider.cc (right): https://codereview.chromium.org/471673002/diff/160001/chrome/browser/autocomplete/search_provider.cc#newcode870 chrome/browser/autocomplete/search_provider.cc:870: // Guarantee that if there's a legal default match ...
6 years, 4 months ago (2014-08-15 23:50:16 UTC) #18
msw
https://codereview.chromium.org/471673002/diff/280001/chrome/browser/autocomplete/search_provider_unittest.cc File chrome/browser/autocomplete/search_provider_unittest.cc (right): https://codereview.chromium.org/471673002/diff/280001/chrome/browser/autocomplete/search_provider_unittest.cc#newcode444 chrome/browser/autocomplete/search_provider_unittest.cc:444: // Send the query twice in order to bypass ...
6 years, 4 months ago (2014-08-15 23:59:14 UTC) #19
msw
The code lgtm, but I'd like myself and Peter to take a closer look at ...
6 years, 4 months ago (2014-08-16 00:01:26 UTC) #20
Mark P
Committed patchset #16 manually as 290058 (presubmit successful).
6 years, 4 months ago (2014-08-16 00:02:56 UTC) #21
Mark P
Comments on your requests for test improvements. Please answer at your leisure. Seriously, there's no ...
6 years, 4 months ago (2014-08-16 00:37:02 UTC) #22
msw
https://codereview.chromium.org/471673002/diff/280001/chrome/browser/autocomplete/search_provider_unittest.cc File chrome/browser/autocomplete/search_provider_unittest.cc (right): https://codereview.chromium.org/471673002/diff/280001/chrome/browser/autocomplete/search_provider_unittest.cc#newcode444 chrome/browser/autocomplete/search_provider_unittest.cc:444: // Send the query twice in order to bypass ...
6 years, 4 months ago (2014-08-16 01:10:17 UTC) #23
Mark P
Hi Mike, This change that we hurried to submit before the branch point did not ...
6 years, 4 months ago (2014-08-25 22:45:09 UTC) #24
msw
6 years, 3 months ago (2014-08-27 18:45:49 UTC) #25
Message was sent while issue was closed.
https://codereview.chromium.org/471673002/diff/280001/chrome/browser/autocomp...
File chrome/browser/autocomplete/search_provider_unittest.cc (right):

https://codereview.chromium.org/471673002/diff/280001/chrome/browser/autocomp...
chrome/browser/autocomplete/search_provider_unittest.cc:1368: {
"[\"a\",[\"a1\"],[],[],{\"google:verbatimrelevance\":10}]",
On 2014/08/25 22:45:08, Mark P wrote:
> On 2014/08/16 01:10:17, msw wrote:
> > Another qq, why did you need to change the verbatim and suggested relevance
> > scores in some places?
> 
> You'll notice that when we roll-back the request from the server to suppress
> verbatim, we make the new relevance score 1.  Because I didn't want any tests
to
> depend on the tie-breaking between a server-provided score of "1" and a
> rolled-back score of "1", I made all the low-value tests here slightly bigger
> values.

Acknowledged.

Powered by Google App Engine
This is Rietveld 408576698