diff options
author | mmentovai@google.com <mmentovai@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-27 20:57:35 +0000 |
---|---|---|
committer | mmentovai@google.com <mmentovai@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-27 20:57:35 +0000 |
commit | d13701900a71240fe1b4074b778133ba9a3461e9 (patch) | |
tree | 3ca3fd78ec07a47dcc2cad83defb977b0ad61e81 /net | |
parent | b8c87bb8ea9f514a8f09a0f2154f8469ba7faf00 (diff) | |
download | chromium_src-d13701900a71240fe1b4074b778133ba9a3461e9.zip chromium_src-d13701900a71240fe1b4074b778133ba9a3461e9.tar.gz chromium_src-d13701900a71240fe1b4074b778133ba9a3461e9.tar.bz2 |
Move std::string16 to base::string16. Don't pollute the std namespace. Don't
assume that all string types can be represented as std::basic_string<CHAR>.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1464 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/base/net_util.cc | 6 | ||||
-rw-r--r-- | net/base/net_util_unittest.cc | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/net/base/net_util.cc b/net/base/net_util.cc index c558787..df012a2 100644 --- a/net/base/net_util.cc +++ b/net/base/net_util.cc @@ -568,7 +568,7 @@ bool IsIDNComponentSafe(const char16* str, void IDNToUnicodeOneComponent(const char16* comp, int comp_len, const std::wstring& languages, - std::string16* out) { + string16* out) { DCHECK(comp_len >= 0); if (comp_len == 0) return; @@ -696,12 +696,12 @@ void IDNToUnicode(const char* host, const std::wstring& languages, std::wstring* out) { // Convert the ASCII input to a wide string for ICU. - std::string16 input16; + string16 input16; input16.reserve(host_len); for (int i = 0; i < host_len; i++) input16.push_back(host[i]); - std::string16 out16; + string16 out16; // The output string is appended to, so convert what's already there if // needed. #if defined(WCHAR_T_IS_UTF32) diff --git a/net/base/net_util_unittest.cc b/net/base/net_util_unittest.cc index 40dce3a..94017fc 100644 --- a/net/base/net_util_unittest.cc +++ b/net/base/net_util_unittest.cc @@ -124,7 +124,7 @@ TEST(NetUtilTest, FileURLConversion) { #endif }; for (size_t i = 0; i < ARRAYSIZE_UNSAFE(url_cases); i++) { - net::FileURLToFilePath(GURL(WideToUTF16(url_cases[i].url)), &output); + net::FileURLToFilePath(GURL(WideToUTF8(url_cases[i].url)), &output); EXPECT_EQ(std::wstring(url_cases[i].file), output); } @@ -137,7 +137,7 @@ TEST(NetUtilTest, FileURLConversion) { #elif defined(OS_POSIX) const wchar_t wide[] = L"/d:/Chinese/\xe6\x89\x80\xe6\x9c\x89\xe4\xb8\xad\xe6\x96\x87\xe7\xbd\x91\xe9\xa1\xb5.doc"; #endif - EXPECT_TRUE(net::FileURLToFilePath(GURL(WideToUTF16(utf8)), &output)); + EXPECT_TRUE(net::FileURLToFilePath(GURL(WideToUTF8(utf8)), &output)); EXPECT_EQ(std::wstring(wide), output); // Unfortunately, UTF8ToWide discards invalid UTF8 input. |