summaryrefslogtreecommitdiffstats
path: root/chrome/browser/net
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-24 20:27:04 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-24 20:27:04 +0000
commit5f0cebb46d66ef0a1996594d0846c0067a8cf475 (patch)
tree5b3204961a403e7396fe48b45930b5b6528839f0 /chrome/browser/net
parent20023a76c3ffa049c35f86263fbf6ee4bbf00ade (diff)
downloadchromium_src-5f0cebb46d66ef0a1996594d0846c0067a8cf475.zip
chromium_src-5f0cebb46d66ef0a1996594d0846c0067a8cf475.tar.gz
chromium_src-5f0cebb46d66ef0a1996594d0846c0067a8cf475.tar.bz2
Add utf_string_conversions to base namespace.
This adds "using"s for all functions so those can be fixed in a separate pass. This converts the "Wide" versions of the functions in the Chrome directory as a first pass on the changeover. BUG= Review URL: https://codereview.chromium.org/12314090 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184352 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net')
-rw-r--r--chrome/browser/net/url_fixer_upper.cc8
-rw-r--r--chrome/browser/net/url_fixer_upper_unittest.cc6
2 files changed, 7 insertions, 7 deletions
diff --git a/chrome/browser/net/url_fixer_upper.cc b/chrome/browser/net/url_fixer_upper.cc
index f590702..79aa98b 100644
--- a/chrome/browser/net/url_fixer_upper.cc
+++ b/chrome/browser/net/url_fixer_upper.cc
@@ -156,7 +156,7 @@ static std::string FixupPath(const std::string& text) {
base::FilePath::StringType filename;
#if defined(OS_WIN)
- base::FilePath input_path(UTF8ToWide(text));
+ base::FilePath input_path(base::UTF8ToWide(text));
PrepareStringForFileOps(input_path, &filename);
// Fixup Windows-style drive letters, where "C:" gets rewritten to "C|".
@@ -563,8 +563,8 @@ GURL URLFixerUpper::FixupRelativeFile(const base::FilePath& base_dir,
// escaped things. We need to go through 8-bit since the escaped values
// only represent 8-bit values.
#if defined(OS_WIN)
- std::wstring unescaped = UTF8ToWide(net::UnescapeURLComponent(
- WideToUTF8(trimmed),
+ std::wstring unescaped = base::UTF8ToWide(net::UnescapeURLComponent(
+ base::WideToUTF8(trimmed),
net::UnescapeRule::SPACES | net::UnescapeRule::URL_SPECIAL_CHARS));
#elif defined(OS_POSIX)
std::string unescaped = net::UnescapeURLComponent(
@@ -591,7 +591,7 @@ GURL URLFixerUpper::FixupRelativeFile(const base::FilePath& base_dir,
// Fall back on regular fixup for this input.
#if defined(OS_WIN)
- std::string text_utf8 = WideToUTF8(text.value());
+ std::string text_utf8 = base::WideToUTF8(text.value());
#elif defined(OS_POSIX)
std::string text_utf8 = text.value();
#endif
diff --git a/chrome/browser/net/url_fixer_upper_unittest.cc b/chrome/browser/net/url_fixer_upper_unittest.cc
index 8c6cfc8..b2a13c5 100644
--- a/chrome/browser/net/url_fixer_upper_unittest.cc
+++ b/chrome/browser/net/url_fixer_upper_unittest.cc
@@ -366,7 +366,7 @@ TEST(URLFixerUpperTest, FixupFile) {
// c:\foo\bar.txt -> file:///c:/foo/bar.txt (basic)
#if defined(OS_WIN)
- GURL fixedup(URLFixerUpper::FixupURL(WideToUTF8(original.value()),
+ GURL fixedup(URLFixerUpper::FixupURL(base::WideToUTF8(original.value()),
std::string()));
#elif defined(OS_POSIX)
GURL fixedup(URLFixerUpper::FixupURL(original.value(), std::string()));
@@ -376,7 +376,7 @@ TEST(URLFixerUpperTest, FixupFile) {
// TODO(port): Make some equivalent tests for posix.
#if defined(OS_WIN)
// c|/foo\bar.txt -> file:///c:/foo/bar.txt (pipe allowed instead of colon)
- std::string cur(WideToUTF8(original.value()));
+ std::string cur(base::WideToUTF8(original.value()));
EXPECT_EQ(':', cur[1]);
cur[1] = '|';
EXPECT_EQ(golden, URLFixerUpper::FixupURL(cur, std::string()));
@@ -461,7 +461,7 @@ TEST(URLFixerUpperTest, FixupRelativeFile) {
for (size_t i = 0; i < arraysize(fixup_cases); ++i) {
fixup_case value = fixup_cases[i];
#if defined(OS_WIN)
- base::FilePath input(UTF8ToWide(value.input));
+ base::FilePath input(base::UTF8ToWide(value.input));
#elif defined(OS_POSIX)
base::FilePath input(value.input);
#endif