Chromium Code Reviews| 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, |