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

Unified Diff: components/omnibox/browser/history_quick_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
« no previous file with comments | « components/omnibox/browser/builtin_provider.cc ('k') | components/omnibox/browser/history_url_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d2f15cf8b46f8465b72252e5415dc707abcd3120..32ac0e778d941172b2a551b7a8b9197e33311b85 100644
--- a/components/omnibox/browser/history_quick_provider.cc
+++ b/components/omnibox/browser/history_quick_provider.cc
@@ -28,8 +28,8 @@
#include "components/omnibox/browser/omnibox_field_trial.h"
#include "components/search_engines/template_url.h"
#include "components/search_engines/template_url_service.h"
+#include "components/url_formatter/url_formatter.h"
#include "net/base/escape.h"
-#include "net/base/net_util.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
#include "url/third_party/mozilla/url_parse.h"
#include "url/url_util.h"
@@ -221,20 +221,21 @@ AutocompleteMatch HistoryQuickProvider::QuickMatchToACMatch(
DCHECK(match.destination_url.is_valid());
// Format the URL autocomplete presentation.
- const net::FormatUrlTypes format_types = net::kFormatUrlOmitAll &
- ~(!history_match.match_in_scheme ? 0 : net::kFormatUrlOmitHTTP);
+ const url_formatter::FormatUrlTypes format_types =
+ url_formatter::kFormatUrlOmitAll &
+ ~(!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, NULL),
+ info.url(), url_formatter::FormatUrl(
+ info.url(), languages_, format_types,
+ net::UnescapeRule::SPACES, nullptr, nullptr, nullptr),
client()->GetSchemeClassifier());
std::vector<size_t> offsets =
OffsetsFromTermMatches(history_match.url_matches);
base::OffsetAdjuster::Adjustments adjustments;
- match.contents = net::FormatUrlWithAdjustments(
- info.url(), languages_, format_types, net::UnescapeRule::SPACES, NULL,
- NULL, &adjustments);
+ match.contents = url_formatter::FormatUrlWithAdjustments(
+ info.url(), languages_, format_types, net::UnescapeRule::SPACES, nullptr,
+ nullptr, &adjustments);
base::OffsetAdjuster::AdjustOffsets(adjustments, &offsets);
TermMatches new_matches =
ReplaceOffsetsInTermMatches(history_match.url_matches, offsets);
« no previous file with comments | « components/omnibox/browser/builtin_provider.cc ('k') | components/omnibox/browser/history_url_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698