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

Unified Diff: chrome/common/net/url_util.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 | « chrome/common/localized_error.cc ('k') | chrome/common/net/x509_certificate_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/net/url_util.cc
diff --git a/chrome/common/net/url_util.cc b/chrome/common/net/url_util.cc
index 9a62afdab6855fbe6bd705db2e0ea7f05101f602..76354b00ec596b757c0e75da7b75cba4c20ebeb0 100644
--- a/chrome/common/net/url_util.cc
+++ b/chrome/common/net/url_util.cc
@@ -5,8 +5,8 @@
#include "chrome/common/net/url_util.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 "ui/base/clipboard/scoped_clipboard_writer.h"
#include "url/gurl.h"
#include "url/url_constants.h"
@@ -19,10 +19,12 @@ void WriteURLToClipboard(const GURL& url, const std::string& languages) {
// Unescaping path and query is not a good idea because other applications
// may not encode non-ASCII characters in UTF-8. See crbug.com/2820.
- base::string16 text = url.SchemeIs(url::kMailToScheme) ?
- base::ASCIIToUTF16(url.path()) :
- net::FormatUrl(url, languages, net::kFormatUrlOmitNothing,
- net::UnescapeRule::NONE, NULL, NULL, NULL);
+ base::string16 text =
+ url.SchemeIs(url::kMailToScheme)
+ ? base::ASCIIToUTF16(url.path())
+ : url_formatter::FormatUrl(
+ url, languages, url_formatter::kFormatUrlOmitNothing,
+ net::UnescapeRule::NONE, nullptr, nullptr, nullptr);
ui::ScopedClipboardWriter scw(ui::CLIPBOARD_TYPE_COPY_PASTE);
scw.WriteURL(text);
« no previous file with comments | « chrome/common/localized_error.cc ('k') | chrome/common/net/x509_certificate_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698