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. |
} |