| Index: components/omnibox/browser/history_url_provider.cc
|
| diff --git a/components/omnibox/browser/history_url_provider.cc b/components/omnibox/browser/history_url_provider.cc
|
| index 2140fbd145be4a8a2f3c49af35a729ed20defbbf..3ad59b5e569fab2814e5f9b735423048612e3536 100644
|
| --- a/components/omnibox/browser/history_url_provider.cc
|
| +++ b/components/omnibox/browser/history_url_provider.cc
|
| @@ -32,8 +32,8 @@
|
| #include "components/omnibox/browser/url_prefix.h"
|
| #include "components/search_engines/search_terms_data.h"
|
| #include "components/search_engines/template_url_service.h"
|
| -#include "components/url_fixer/url_fixer.h"
|
| -#include "net/base/net_util.h"
|
| +#include "components/url_formatter/url_fixer.h"
|
| +#include "components/url_formatter/url_formatter.h"
|
| #include "net/base/registry_controlled_domains/registry_controlled_domain.h"
|
| #include "url/gurl.h"
|
| #include "url/third_party/mozilla/url_parse.h"
|
| @@ -494,7 +494,7 @@ void HistoryURLProvider::Start(const AutocompleteInput& input,
|
| if (!fixup_return.first)
|
| return;
|
| url::Parsed parts;
|
| - url_fixer::SegmentURL(fixup_return.second, &parts);
|
| + url_formatter::SegmentURL(fixup_return.second, &parts);
|
| AutocompleteInput fixed_up_input(input);
|
| fixed_up_input.UpdateText(fixup_return.second, base::string16::npos, parts);
|
|
|
| @@ -590,10 +590,10 @@ AutocompleteMatch HistoryURLProvider::SuggestExactInput(
|
| // Trim off "http://" if the user didn't type it.
|
| DCHECK(!trim_http ||
|
| !AutocompleteInput::HasHTTPScheme(input.text()));
|
| - base::string16 display_string(
|
| - net::FormatUrl(destination_url, std::string(),
|
| - net::kFormatUrlOmitAll & ~net::kFormatUrlOmitHTTP,
|
| - net::UnescapeRule::SPACES, NULL, NULL, NULL));
|
| + base::string16 display_string(url_formatter::FormatUrl(
|
| + destination_url, std::string(),
|
| + url_formatter::kFormatUrlOmitAll & ~url_formatter::kFormatUrlOmitHTTP,
|
| + net::UnescapeRule::SPACES, nullptr, nullptr, nullptr));
|
| const size_t offset = trim_http ? TrimHttpPrefix(&display_string) : 0;
|
| match.fill_into_edit =
|
| AutocompleteInput::FormattedStringWithEquivalentMeaning(
|
| @@ -1160,14 +1160,17 @@ AutocompleteMatch HistoryURLProvider::HistoryMatchToACMatch(
|
| history_match.input_location + params.input.text().length();
|
| std::string languages = (match_type == WHAT_YOU_TYPED) ?
|
| std::string() : params.languages;
|
| - const net::FormatUrlTypes format_types = net::kFormatUrlOmitAll &
|
| - ~((params.trim_http && !history_match.match_in_scheme) ?
|
| - 0 : net::kFormatUrlOmitHTTP);
|
| + const url_formatter::FormatUrlTypes format_types =
|
| + url_formatter::kFormatUrlOmitAll &
|
| + ~((params.trim_http && !history_match.match_in_scheme)
|
| + ? 0
|
| + : url_formatter::kFormatUrlOmitHTTP);
|
| match.fill_into_edit =
|
| AutocompleteInput::FormattedStringWithEquivalentMeaning(
|
| - info.url(), net::FormatUrl(info.url(), languages, format_types,
|
| - net::UnescapeRule::SPACES, NULL, NULL,
|
| - &inline_autocomplete_offset),
|
| + info.url(),
|
| + url_formatter::FormatUrl(info.url(), languages, format_types,
|
| + net::UnescapeRule::SPACES, nullptr, nullptr,
|
| + &inline_autocomplete_offset),
|
| client()->GetSchemeClassifier());
|
| if (!params.prevent_inline_autocomplete &&
|
| (inline_autocomplete_offset != base::string16::npos)) {
|
| @@ -1182,8 +1185,9 @@ AutocompleteMatch HistoryURLProvider::HistoryMatchToACMatch(
|
| (inline_autocomplete_offset >= match.fill_into_edit.length()));
|
|
|
| size_t match_start = history_match.input_location;
|
| - match.contents = net::FormatUrl(info.url(), languages,
|
| - format_types, net::UnescapeRule::SPACES, NULL, NULL, &match_start);
|
| + match.contents = url_formatter::FormatUrl(info.url(), languages, format_types,
|
| + net::UnescapeRule::SPACES, nullptr,
|
| + nullptr, &match_start);
|
| if ((match_start != base::string16::npos) &&
|
| (inline_autocomplete_offset != base::string16::npos) &&
|
| (inline_autocomplete_offset != match_start)) {
|
|
|