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

Unified Diff: components/omnibox/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: Compile fixes following rebase 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/search_provider.cc
diff --git a/components/omnibox/search_provider.cc b/components/omnibox/search_provider.cc
index e97e7f09302160f4873e7784974334e0ab634d8f..795128373a1c7c20ed46728eb8f27bb8633630ee 100644
--- a/components/omnibox/search_provider.cc
+++ b/components/omnibox/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"
@@ -1395,8 +1395,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_->AcceptLanguages());
size_t inline_autocomplete_offset = (prefix == NULL) ?
@@ -1404,9 +1405,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, NULL, NULL,
+ &inline_autocomplete_offset),
client_->SchemeClassifier());
// Preserve the forced query '?' prefix in |match.fill_into_edit|.
// Otherwise, user edits to a suggestion would show non-Search results.

Powered by Google App Engine
This is Rietveld 408576698