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

Issue 2868085: Fixes bug 12305 -- 1.66:1 should be UNKNOWN, not URL. (Closed)

Created:
10 years, 4 months ago by isherman
Modified:
9 years, 7 months ago
CC:
chromium-reviews, Paweł Hajdan Jr., ben+cc_chromium.org
Base URL:
http://src.chromium.org/git/chromium.git
Visibility:
Public.

Description

Fixes bug 12305 -- 1.66:1 should be UNKNOWN, not URL. Rearranges the autocomplete heuristics to reject malformed IP addresses before accepting them based on having a port or a username or a password. BUG=12305 TEST=AutocompleteTest.InputType Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=54977

Patch Set 1 #

Total comments: 9

Patch Set 2 : Addresses review comments, cleans up logic a bit. #

Total comments: 1

Patch Set 3 : comment tweaked #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -32 lines) Patch
M chrome/browser/autocomplete/autocomplete.cc View 1 2 3 chunks +43 lines, -31 lines 1 comment Download
M chrome/browser/autocomplete/autocomplete_unittest.cc View 1 2 3 chunks +8 lines, -1 line 0 comments Download

Messages

Total messages: 6 (0 generated)
isherman
This is my first patch, so apologies in advance if I did something trivially foolish.
10 years, 4 months ago (2010-07-30 01:17:38 UTC) #1
Peter Kasting
http://codereview.chromium.org/2868085/diff/1/2 File chrome/browser/autocomplete/autocomplete.cc (left): http://codereview.chromium.org/2868085/diff/1/2#oldcode244 chrome/browser/autocomplete/autocomplete.cc:244: // Presence of a username could either indicate a ...
10 years, 4 months ago (2010-07-30 01:37:41 UTC) #2
isherman
Thanks for the suggestions :) About to upload an updated patch addressing most of them, ...
10 years, 4 months ago (2010-07-31 04:58:23 UTC) #3
Peter Kasting
http://codereview.chromium.org/2868085/diff/1/2 File chrome/browser/autocomplete/autocomplete.cc (left): http://codereview.chromium.org/2868085/diff/1/2#oldcode244 chrome/browser/autocomplete/autocomplete.cc:244: // Presence of a username could either indicate a ...
10 years, 4 months ago (2010-07-31 17:48:10 UTC) #4
isherman
http://codereview.chromium.org/2868085/diff/1/2 File chrome/browser/autocomplete/autocomplete.cc (left): http://codereview.chromium.org/2868085/diff/1/2#oldcode244 chrome/browser/autocomplete/autocomplete.cc:244: // Presence of a username could either indicate a ...
10 years, 4 months ago (2010-08-02 10:01:46 UTC) #5
Peter Kasting
10 years, 4 months ago (2010-08-04 17:54:13 UTC) #6
LGTM

http://codereview.chromium.org/2868085/diff/9001/10001
File chrome/browser/autocomplete/autocomplete.cc (right):

http://codereview.chromium.org/2868085/diff/9001/10001#newcode126
chrome/browser/autocomplete/autocomplete.cc:126: // A user might or might not
type a scheme when entering a file URL.  In
Nit: Thanks for the comment update, it's a lot clearer.

This might be even clearer:

  // Check if this is a file: URL.  We need to check |parsed_scheme| instead of
  // |parts->scheme| because the latter will be empty if the user didn't
  // explicitly type "file://" and instead just typed e.g. "C:\foo".
  if (parsed_scheme == L"file")
    return URL;

Powered by Google App Engine
This is Rietveld 408576698