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

Issue 372017: Fix various problems with inline autocomplete and URLs that change length dur... (Closed)

Created:
11 years, 1 month ago by Peter Kasting
Modified:
9 years, 7 months ago
Reviewers:
brettw, sky
CC:
chromium-reviews_googlegroups.com, brettw+cc_chromium.org, darin (slow to review), ben+cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Fix various problems with inline autocomplete and URLs that change length during fixup: * URLs with http auth info, which gets stripped * URLs with IDN hosts * URLs with escaped values that get unescaped In cases like these, we'd inline autocomplete from the wrong locations, highlight the wrong portions of the URL as matches, and sometimes DCHECK() in debug mode. The fix is to track how fixup affects the offsets into the URL we care about. Plumbing this required an enormous number of additions :( There is also a fix here to the URL Fixer Upper, which was obviously modified at some point in the past to use the Parsed components, but without updating the comments or some of the functionality to match. Since this isn't supposed to "fix up" things that aren't simple typos, I removed some code to "fix" bogus ports, which was causing bizarre effects when typing HTTP auth URLs ("http://foo:bar" would be fixed to "http://foo" and then matched for inline autocompletion, which was clearly wrong). This is tested incidentally by one of the new History URL Provider tests (which is how I discovered it). BUG=4010 TEST=Covered by unittests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=31352

Patch Set 1 #

Total comments: 8

Patch Set 2 : '' #

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1158 lines, -2060 lines) Patch
M app/gfx/text_elider.cc View 3 chunks +5 lines, -5 lines 0 comments Download
M base/base.gyp View 1 chunk +1 line, -0 lines 0 comments Download
M base/i18n/icu_string_conversions.h View 3 chunks +35 lines, -8 lines 0 comments Download
M base/i18n/icu_string_conversions.cc View 1 2 3 chunks +128 lines, -76 lines 0 comments Download
M base/i18n/icu_string_conversions_unittest.cc View 1 2 8 chunks +48 lines, -7 lines 0 comments Download
M base/string_util_unittest.cc View 1 2 2 chunks +1 line, -198 lines 0 comments Download
M base/utf_string_conversions.h View 2 chunks +58 lines, -8 lines 0 comments Download
M base/utf_string_conversions.cc View 1 6 chunks +142 lines, -111 lines 0 comments Download
A + base/utf_string_conversions_unittest.cc View 1 2 10 chunks +74 lines, -1316 lines 0 comments Download
M chrome/browser/autocomplete/autocomplete.h View 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/autocomplete/autocomplete.cc View 2 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/autocomplete/history_url_provider.h View 4 chunks +10 lines, -10 lines 0 comments Download
M chrome/browser/autocomplete/history_url_provider.cc View 3 chunks +39 lines, -20 lines 0 comments Download
M chrome/browser/autocomplete/history_url_provider_unittest.cc View 5 chunks +28 lines, -1 line 0 comments Download
M chrome/browser/bookmarks/bookmark_table_model.cc View 2 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/bookmarks/bookmark_utils.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/gtk/options/exceptions_page_gtk.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/gtk/options/passwords_page_gtk.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/gtk/options/url_picker_dialog_gtk.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/net/browser_url_util.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/net/url_fixer_upper.cc View 6 chunks +9 lines, -26 lines 0 comments Download
M chrome/browser/net/url_fixer_upper_unittest.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/toolbar_model.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/views/bookmark_editor_view.cc View 2 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/views/url_picker.cc View 2 chunks +3 lines, -4 lines 0 comments Download
M net/base/escape.h View 2 chunks +12 lines, -12 lines 0 comments Download
M net/base/escape.cc View 4 chunks +33 lines, -9 lines 0 comments Download
M net/base/escape_unittest.cc View 9 chunks +80 lines, -45 lines 0 comments Download
M net/base/net_util.h View 3 chunks +39 lines, -18 lines 0 comments Download
M net/base/net_util.cc View 1 12 chunks +222 lines, -131 lines 0 comments Download
M net/base/net_util_unittest.cc View 1 11 chunks +162 lines, -21 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Peter Kasting
This really should be reviewed by Brett, but since I'm trying to get it in ...
11 years, 1 month ago (2009-11-06 09:35:38 UTC) #1
sky
LGTM Brett, be sure and give this a once over when you're back. http://codereview.chromium.org/372017/diff/1/14 File ...
11 years, 1 month ago (2009-11-06 19:22:24 UTC) #2
Peter Kasting
11 years, 1 month ago (2009-11-07 00:07:37 UTC) #3
http://codereview.chromium.org/372017/diff/1/26
File chrome/browser/net/url_fixer_upper.cc (right):

http://codereview.chromium.org/372017/diff/1/26#newcode275
Line 275: // We don't fix up the port at the moment.
On 2009/11/06 19:22:24, sky wrote:
> How about a comment as to why we don't?

It's not obvious what to say, and this matches the multiple places above and
below that we have this same comment :/

http://codereview.chromium.org/372017/diff/1/6
File net/base/net_util.cc (right):

http://codereview.chromium.org/372017/diff/1/6#newcode685
Line 685: // We'll break out of the loop below.
This got a little clearer when I removed the comment and added some whitespace.

Powered by Google App Engine
This is Rietveld 408576698