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

Issue 271116: Classify more types of input as queries.... (Closed)

Created:
11 years, 2 months ago by Peter Kasting
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com, darin (slow to review), ben+cc_chromium.org, tim (not reviewing)
Visibility:
Public.

Description

Classify more types of input as queries. This adds an oracle that can determine if a hostname is RFC 1738 compliant; if we get a hostname that's not an IP address and not compliant here, we almost certainly have a query. This also rejects "ports" that don't consist of a number between 0 and 65535 (e.g. port "abc" or port "123456"). BUG=18817 TEST=The string "foo: bar" (with quotes) should default to search, not navigate, in the address bar. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=29317

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+113 lines, -15 lines) Patch
M chrome/browser/autocomplete/autocomplete.cc View 2 chunks +23 lines, -15 lines 1 comment Download
M net/base/net_util.h View 1 chunk +11 lines, -0 lines 0 comments Download
M net/base/net_util.cc View 1 chunk +48 lines, -0 lines 0 comments Download
M net/base/net_util_unittest.cc View 2 chunks +31 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Peter Kasting
Peremptory comment below. http://codereview.chromium.org/271116/diff/1/5 File chrome/browser/autocomplete/autocomplete.cc (right): http://codereview.chromium.org/271116/diff/1/5#newcode187 Line 187: (port >= 0) && (port ...
11 years, 2 months ago (2009-10-16 01:54:10 UTC) #1
Paweł Hajdan Jr.
Drive-by. Could you add a test for that, for example in autocomplete_browsertest? This way we ...
11 years, 2 months ago (2009-10-16 05:25:01 UTC) #2
brettw
LGTM
11 years, 2 months ago (2009-10-16 16:11:48 UTC) #3
Peter Kasting
11 years, 2 months ago (2009-10-16 19:49:12 UTC) #4
On 2009/10/16 05:25:01, Paweł Hajdan Jr. wrote:
> Drive-by.
> 
> Could you add a test for that, for example in autocomplete_browsertest? This
way
> we can get the autocomplete tested step by step, at least for new changes.

Good call.  I actually have a direct unittest of the AutocompleteInput
classifier so I added a few more tests there.

I went ahead and landed this.

Powered by Google App Engine
This is Rietveld 408576698