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

Unified Diff: chrome/browser/ui/elide_url.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: chrome/browser/ui/elide_url.cc
diff --git a/chrome/browser/ui/elide_url.cc b/chrome/browser/ui/elide_url.cc
index afa6d7a880abc4916742a14268cf672da2e5d4f9..d438e02102c8cadd97a7962fe8a5809084627d79 100644
--- a/chrome/browser/ui/elide_url.cc
+++ b/chrome/browser/ui/elide_url.cc
@@ -7,8 +7,8 @@
#include "base/logging.h"
#include "base/strings/string_split.h"
#include "base/strings/utf_string_conversions.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 "ui/gfx/text_elider.h"
#include "ui/gfx/text_utils.h"
@@ -116,9 +116,9 @@ base::string16 ElideUrl(const GURL& url,
const std::string& languages) {
// Get a formatted string and corresponding parsing of the url.
url::Parsed parsed;
- const base::string16 url_string =
- net::FormatUrl(url, languages, net::kFormatUrlOmitAll,
- net::UnescapeRule::SPACES, &parsed, NULL, NULL);
+ const base::string16 url_string = url_formatter::FormatUrl(
+ url, languages, url_formatter::kFormatUrlOmitAll,
+ net::UnescapeRule::SPACES, &parsed, nullptr, nullptr);
if (available_pixel_width <= 0)
return url_string;
@@ -306,7 +306,7 @@ base::string16 ElideHost(const GURL& url,
base::string16 FormatUrlForSecurityDisplay(const GURL& url,
const std::string& languages) {
if (!url.is_valid() || url.is_empty() || !url.IsStandard())
- return net::FormatUrl(url, languages);
+ return url_formatter::FormatUrl(url, languages);
const base::string16 colon(base::ASCIIToUTF16(":"));
const base::string16 scheme_separator(

Powered by Google App Engine
This is Rietveld 408576698