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

Unified Diff: components/omnibox/history_quick_provider.cc

Issue 1215233003: Reland - Omnibox - Mark As Duplicates URLs that only differ by a trailing slash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move const Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/omnibox/history_quick_provider.cc
diff --git a/components/omnibox/history_quick_provider.cc b/components/omnibox/history_quick_provider.cc
index a6b9f16bb9a2cd6c08fa81779b934072e709fd53..8b0a1ba4961995c36639e6bbf7c6ac06785c0588 100644
--- a/components/omnibox/history_quick_provider.cc
+++ b/components/omnibox/history_quick_provider.cc
@@ -254,11 +254,12 @@ AutocompleteMatch HistoryQuickProvider::QuickMatchToACMatch(
new_matches[0].length;
// |inline_autocomplete_offset| may be beyond the end of the
// |fill_into_edit| if the user has typed an URL with a scheme and the
- // last character typed is a slash. That slash is removed by the
+ // last character typed is a slash. That slash may be removed by the
// FormatURLWithOffsets call above.
if (inline_autocomplete_offset < match.fill_into_edit.length()) {
match.inline_autocompletion =
match.fill_into_edit.substr(inline_autocomplete_offset);
+ match.StripLoneSlashOnInlineAutocompletion();
}
match.allowed_to_be_default_match = match.inline_autocompletion.empty() ||
!PreventInlineAutocomplete(autocomplete_input_);

Powered by Google App Engine
This is Rietveld 408576698