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

Unified Diff: components/omnibox/bookmark_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/bookmark_provider.cc
diff --git a/components/omnibox/bookmark_provider.cc b/components/omnibox/bookmark_provider.cc
index 3eea212146f4393677803eaba380518803b2d1e4..e252ef1cd13d5a08f71e27c74c5ce10116039368 100644
--- a/components/omnibox/bookmark_provider.cc
+++ b/components/omnibox/bookmark_provider.cc
@@ -206,11 +206,12 @@ AutocompleteMatch BookmarkProvider::BookmarkMatchToACMatch(
if (inline_autocomplete_offset != base::string16::npos) {
// |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()) {
Peter Kasting 2015/07/01 22:01:36 Nit: Other than the builtin provider, every other
match.inline_autocompletion =
match.fill_into_edit.substr(inline_autocomplete_offset);
+ match.StripLoneSlashOnInlineAutocompletion();
}
match.allowed_to_be_default_match = match.inline_autocompletion.empty() ||
!HistoryProvider::PreventInlineAutocomplete(input);

Powered by Google App Engine
This is Rietveld 408576698