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

Unified Diff: components/url_fixer/url_fixer.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/url_fixer/url_fixer.cc
diff --git a/components/url_fixer/url_fixer.cc b/components/url_fixer/url_fixer.cc
index eaf85b0d00eccc163b8846fb9d9b932a20c12110..676be161b245d50a1b5634d569d6eb7e7160e5f3 100644
--- a/components/url_fixer/url_fixer.cc
+++ b/components/url_fixer/url_fixer.cc
@@ -14,9 +14,9 @@
#endif
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
+#include "components/url_formatter/url_formatter.h"
#include "net/base/escape.h"
#include "net/base/filename_util.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_file.h"
@@ -180,13 +180,9 @@ std::string FixupPath(const std::string& text) {
// Here, we know the input looks like a file.
GURL file_url = net::FilePathToFileURL(base::FilePath(filename));
if (file_url.is_valid()) {
- return base::UTF16ToUTF8(net::FormatUrl(file_url,
- std::string(),
- net::kFormatUrlOmitUsernamePassword,
- net::UnescapeRule::NORMAL,
- NULL,
- NULL,
- NULL));
+ return base::UTF16ToUTF8(url_formatter::FormatUrl(
+ file_url, std::string(), url_formatter::kFormatUrlOmitUsernamePassword,
+ net::UnescapeRule::NORMAL, nullptr, nullptr, nullptr));
}
// Invalid file URL, just return the input.
@@ -637,14 +633,10 @@ GURL url_fixer::FixupRelativeFile(const base::FilePath& base_dir,
if (is_file) {
GURL file_url = net::FilePathToFileURL(full_path);
if (file_url.is_valid())
- return GURL(
- base::UTF16ToUTF8(net::FormatUrl(file_url,
- std::string(),
- net::kFormatUrlOmitUsernamePassword,
- net::UnescapeRule::NORMAL,
- NULL,
- NULL,
- NULL)));
+ return GURL(base::UTF16ToUTF8(url_formatter::FormatUrl(
+ file_url, std::string(),
+ url_formatter::kFormatUrlOmitUsernamePassword,
+ net::UnescapeRule::NORMAL, nullptr, nullptr, nullptr)));
// Invalid files fall through to regular processing.
}

Powered by Google App Engine
This is Rietveld 408576698