Reland "[omnibox] Handle URL ellision a little more consistently"
This makes a tiny fix to the previous change, which was failing on Win 7 debug. There is a line in ScoredHistoryMatch::ScoredHistoryMatch(...) which dereferences a string's rbegin() iterator. (Searching for 'rbegin' will find the only occurrence.) Thus the code expects a non-empty string. I'm guessing it passed the other platforms because they store a '\0' there, while a debug build might be more diligent. This change simply changes history_quick_provider_unittest.cc to pass a non-empty string to that parameter. Revert: 817298 Original CL: 794432 When the option hide-suggestion-url-scheme is enabled, Omnibox suggestions exclude the scheme in some cases where they would be inconsistent with other suggestions. This change preserves schemes when the user specified one. This change asserts 'preserve_scheme' to GetFormatTypes() now if alternatively the input, interpretted as a URL, has a scheme. This changes the treatment of http (and https when certain flags are set.) Previously it was only asserted if there was a match in the scheme. Added many tests as well. Bug: 761505 Change-Id: I417448ffbb370d86c794309520083cff10ea5957 Reviewed-on: https://chromium-review.googlesource.com/820354 Commit-Queue: Kevin Bailey <krb@chromium.org> Reviewed-by:Mark Pearson <mpearson@chromium.org> Cr-Commit-Position: refs/heads/master@{#523283}
Showing
Please register or sign in to comment