diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-10 20:40:50 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-10 20:40:50 +0000 |
commit | d6e58c6ef48f52cce6cdf781c5a507e254322425 (patch) | |
tree | 274e82d3fa22052761a146eaed25d862744633af /net/proxy | |
parent | 3522bda4050a25b9020d9c224e9dfc89439e2f5e (diff) | |
download | chromium_src-d6e58c6ef48f52cce6cdf781c5a507e254322425.zip chromium_src-d6e58c6ef48f52cce6cdf781c5a507e254322425.tar.gz chromium_src-d6e58c6ef48f52cce6cdf781c5a507e254322425.tar.bz2 |
Remove the dependency on i18n/icu_string_conversions from base/string_util.h.
Fix up all files requireing this header to include it directly. Split out the
ICU-dependent string util unit tests into a new file
base/i18n/icu_string_util_unittest.cc
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/269034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28674 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/proxy')
-rw-r--r-- | net/proxy/proxy_script_fetcher.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/net/proxy/proxy_script_fetcher.cc b/net/proxy/proxy_script_fetcher.cc index 83189ef..882c406 100644 --- a/net/proxy/proxy_script_fetcher.cc +++ b/net/proxy/proxy_script_fetcher.cc @@ -5,10 +5,12 @@ #include "net/proxy/proxy_script_fetcher.h" #include "base/compiler_specific.h" +#include "base/i18n/icu_string_conversions.h" #include "base/logging.h" #include "base/message_loop.h" #include "base/ref_counted.h" #include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "net/base/io_buffer.h" #include "net/base/load_flags.h" #include "net/base/net_errors.h" @@ -50,7 +52,7 @@ void ConvertResponseToUTF8(const std::string& charset, std::string* bytes) { if (charset.empty()) { // Assume ISO-8859-1 if no charset was specified. - codepage = "ISO-8859-1"; + codepage = base::kCodepageLatin1; } else { // Otherwise trust the charset that was provided. codepage = charset.c_str(); @@ -60,9 +62,9 @@ void ConvertResponseToUTF8(const std::string& charset, std::string* bytes) { // outside of |charset| (i.e. invalid), then substitute them with // U+FFFD rather than failing. std::wstring tmp_wide; - CodepageToWide(*bytes, codepage, - OnStringUtilConversionError::SUBSTITUTE, - &tmp_wide); + base::CodepageToWide(*bytes, codepage, + base::OnStringConversionError::SUBSTITUTE, + &tmp_wide); // TODO(eroman): would be nice to have a CodepageToUTF8() function. *bytes = WideToUTF8(tmp_wide); } |