Chromium Code Reviews| Index: components/omnibox/browser/history_quick_provider.cc |
| diff --git a/components/omnibox/browser/history_quick_provider.cc b/components/omnibox/browser/history_quick_provider.cc |
| index eeab8c16886261eaeb169b2c85a87920fec88657..b751693f1fd52d5851f30f0fed294c553ab975ee 100644 |
| --- a/components/omnibox/browser/history_quick_provider.cc |
| +++ b/components/omnibox/browser/history_quick_provider.cc |
| @@ -141,19 +141,18 @@ void HistoryQuickProvider::DoAutocomplete() { |
| !autocomplete_input_.parts().ref.is_nonempty()) { |
| // Not visited, but we've seen the host before. |
| will_have_url_what_you_typed_match_first = true; |
| - const size_t registry_length = |
| - net::registry_controlled_domains::GetRegistryLength( |
| + if (net::registry_controlled_domains::HostHasRegistryControlledDomain( |
| host, |
| net::registry_controlled_domains::EXCLUDE_UNKNOWN_REGISTRIES, |
| - net::registry_controlled_domains::EXCLUDE_PRIVATE_REGISTRIES); |
| - if (registry_length == 0) { |
| - // Known intranet hosts get one score. |
| + net::registry_controlled_domains:: |
| + EXCLUDE_PRIVATE_REGISTRIES)) { |
| + // Known internet host. |
| url_what_you_typed_match_score = |
| - HistoryURLProvider::kScoreForUnvisitedIntranetResult; |
| + HistoryURLProvider::kScoreForWhatYouTypedResult; |
| } else { |
| - // Known internet hosts get another. |
| + // Probably an intranet host. |
| url_what_you_typed_match_score = |
| - HistoryURLProvider::kScoreForWhatYouTypedResult; |
| + HistoryURLProvider::kScoreForUnvisitedIntranetResult; |
| } |
|
Peter Kasting
2016/10/22 05:04:18
Nit: Simpler:
// Internet hosts get one
brettw
2016/10/24 21:45:23
Not done.
Peter Kasting
2016/10/24 23:04:32
I'm OK with this not being done, but I was slightl
brettw
2016/10/25 20:28:17
I removed "Probably" from the comment.
|
| } |
| } |