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

Issue 291005: Allow the history URL provider to handle input of type QUERY. This helps in ... (Closed)

Created:
11 years, 2 months ago by Peter Kasting
Modified:
9 years, 7 months ago
Reviewers:
sky, Paweł Hajdan Jr.
CC:
chromium-reviews_googlegroups.com, tim (not reviewing), ben+cc_chromium.org
Visibility:
Public.

Description

Allow the history URL provider to handle input of type QUERY. This helps in the case where the user types something that on its own isn't navigable, but might be the prefix of something else navigable. While there are no tests for this directly, another change of mine to treat more inputs with explicit schemes as queries (e.g. "http:/") relies on this, and does unittest for it. In order to fit the new relevance scores into the table, I went through and simplified the relevance scoring so that generally providers used the same scores for more input types. The effects of this should be barely noticeable (it affects the ranking of past search queries that are old against results from the secondary search provider), and it simplifies the code noticeably. This also fixes a "bug" that the NavSuggest results were incremented backwards, but since we only score one of these right now there's no visible effect. BUG=none TEST=none

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+94 lines, -153 lines) Patch
M chrome/browser/autocomplete/autocomplete.h View 4 chunks +25 lines, -19 lines 0 comments Download
M chrome/browser/autocomplete/history_contents_provider.cc View 1 chunk +5 lines, -25 lines 0 comments Download
M chrome/browser/autocomplete/history_url_provider.cc View 6 chunks +11 lines, -8 lines 0 comments Download
M chrome/browser/autocomplete/history_url_provider_unittest.cc View 3 chunks +6 lines, -3 lines 3 comments Download
M chrome/browser/autocomplete/keyword_provider.cc View 1 chunk +4 lines, -17 lines 0 comments Download
M chrome/browser/autocomplete/search_provider.h View 1 chunk +8 lines, -7 lines 0 comments Download
M chrome/browser/autocomplete/search_provider.cc View 4 chunks +35 lines, -74 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Peter Kasting
11 years, 2 months ago (2009-10-16 23:21:02 UTC) #1
Paweł Hajdan Jr.
Drive-by with some test-style related comments. http://codereview.chromium.org/291005/diff/1/6 File chrome/browser/autocomplete/history_url_provider_unittest.cc (right): http://codereview.chromium.org/291005/diff/1/6#newcode215 Line 215: if (!matches_.empty()) ...
11 years, 2 months ago (2009-10-17 06:42:24 UTC) #2
sky
LGTM
11 years, 2 months ago (2009-10-19 15:51:50 UTC) #3
Peter Kasting
11 years, 2 months ago (2009-10-19 18:42:26 UTC) #4
On 2009/10/17 06:42:24, Paweł Hajdan Jr. wrote:
> http://codereview.chromium.org/291005/diff/1/6#newcode215
> Line 215: if (!matches_.empty())  // If this fails, RunTest() already printed
> it.
> Could you rather make it ASSERT_FALSE(matches_.empty()) or
> ASSERT_NO_FATAL_FAILURE(RunTest(L"news", std::wstring(), ... ? This way we can
> always be sure about the code path taken in test when it passes.

Sure, done.  Landing.

Powered by Google App Engine
This is Rietveld 408576698