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

Unified Diff: components/omnibox/history_url_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_url_provider.cc
diff --git a/components/omnibox/history_url_provider.cc b/components/omnibox/history_url_provider.cc
index faa4b2fb0a74843053f8ccbef10fefc9a11fce33..5a84fc3f0c510d65acb03f33abbf1230c88f7acc 100644
--- a/components/omnibox/history_url_provider.cc
+++ b/components/omnibox/history_url_provider.cc
@@ -1176,17 +1176,15 @@ AutocompleteMatch HistoryURLProvider::HistoryMatchToACMatch(
net::UnescapeRule::SPACES, NULL, NULL,
&inline_autocomplete_offset),
client()->GetSchemeClassifier());
- if (!params.prevent_inline_autocomplete &&
Peter Kasting 2015/07/01 22:01:36 What makes this safe to remove?
- (inline_autocomplete_offset != base::string16::npos)) {
+ if (inline_autocomplete_offset != base::string16::npos) {
DCHECK(inline_autocomplete_offset <= match.fill_into_edit.length());
match.inline_autocompletion =
match.fill_into_edit.substr(inline_autocomplete_offset);
+ match.StripLoneSlashOnInlineAutocompletion();
}
- // The latter part of the test effectively asks "is the inline completion
- // empty?" (i.e., is this match effectively the what-you-typed match?).
match.allowed_to_be_default_match = !params.prevent_inline_autocomplete ||
((inline_autocomplete_offset != base::string16::npos) &&
- (inline_autocomplete_offset >= match.fill_into_edit.length()));
+ match.inline_autocompletion.empty());
size_t match_start = history_match.input_location;
match.contents = net::FormatUrl(info.url(), languages,

Powered by Google App Engine
This is Rietveld 408576698