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

Unified Diff: components/omnibox/browser/search_provider.cc

Issue 1171333003: Move net::FormatUrl and friends outside of //net and into //components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase again now that CQ is fixed Created 5 years, 4 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/browser/search_provider.cc
diff --git a/components/omnibox/browser/search_provider.cc b/components/omnibox/browser/search_provider.cc
index 9067f859f486a4dac6f537841c04baecac68c0c7..7f4aab1bea67bc7ce6f33fbd9396c859d273406a 100644
--- a/components/omnibox/browser/search_provider.cc
+++ b/components/omnibox/browser/search_provider.cc
@@ -31,11 +31,11 @@
#include "components/search/search.h"
#include "components/search_engines/template_url_prepopulate_data.h"
#include "components/search_engines/template_url_service.h"
+#include "components/url_formatter/url_formatter.h"
#include "components/variations/net/variations_http_header_provider.h"
#include "grit/components_strings.h"
#include "net/base/escape.h"
#include "net/base/load_flags.h"
-#include "net/base/net_util.h"
#include "net/http/http_request_headers.h"
#include "net/url_request/url_fetcher.h"
#include "net/url_request/url_request_status.h"
@@ -1379,8 +1379,9 @@ AutocompleteMatch SearchProvider::NavigationToMatch(
navigation.formatted_url().find(input) : prefix->prefix.length();
bool trim_http = !AutocompleteInput::HasHTTPScheme(input) &&
(!prefix || (match_start != 0));
- const net::FormatUrlTypes format_types =
- net::kFormatUrlOmitAll & ~(trim_http ? 0 : net::kFormatUrlOmitHTTP);
+ const url_formatter::FormatUrlTypes format_types =
+ url_formatter::kFormatUrlOmitAll &
+ ~(trim_http ? 0 : url_formatter::kFormatUrlOmitHTTP);
const std::string languages(client()->GetAcceptLanguages());
size_t inline_autocomplete_offset = (prefix == NULL) ?
@@ -1388,9 +1389,9 @@ AutocompleteMatch SearchProvider::NavigationToMatch(
match.fill_into_edit +=
AutocompleteInput::FormattedStringWithEquivalentMeaning(
navigation.url(),
- net::FormatUrl(navigation.url(), languages, format_types,
- net::UnescapeRule::SPACES, NULL, NULL,
- &inline_autocomplete_offset),
+ url_formatter::FormatUrl(navigation.url(), languages, format_types,
+ net::UnescapeRule::SPACES, nullptr, nullptr,
+ &inline_autocomplete_offset),
client()->GetSchemeClassifier());
// Preserve the forced query '?' prefix in |match.fill_into_edit|.
// Otherwise, user edits to a suggestion would show non-Search results.
« no previous file with comments | « components/omnibox/browser/omnibox_edit_model.cc ('k') | components/omnibox/browser/search_suggestion_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698