summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-10 20:40:50 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-10 20:40:50 +0000
commitd6e58c6ef48f52cce6cdf781c5a507e254322425 (patch)
tree274e82d3fa22052761a146eaed25d862744633af /webkit
parent3522bda4050a25b9020d9c224e9dfc89439e2f5e (diff)
downloadchromium_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 'webkit')
-rw-r--r--webkit/appcache/manifest_parser.cc7
-rw-r--r--webkit/glue/ftp_directory_listing_response_delegate.cc12
2 files changed, 11 insertions, 8 deletions
diff --git a/webkit/appcache/manifest_parser.cc b/webkit/appcache/manifest_parser.cc
index 4782ce5..652582a 100644
--- a/webkit/appcache/manifest_parser.cc
+++ b/webkit/appcache/manifest_parser.cc
@@ -31,8 +31,9 @@
#include "webkit/appcache/manifest_parser.h"
+#include "base/i18n/icu_string_conversions.h"
#include "base/logging.h"
-#include "base/string_util.h"
+#include "base/utf_string_conversions.h"
#include "googleurl/src/gurl.h"
namespace appcache {
@@ -58,8 +59,8 @@ bool ParseManifest(const GURL& manifest_url, const char* data, int length,
std::wstring data_string;
// TODO(jennb): cannot do UTF8ToWide(data, length, &data_string);
// until UTF8ToWide uses 0xFFFD Unicode replacement character.
- CodepageToWide(std::string(data, length), "UTF-8",
- OnStringUtilConversionError::SUBSTITUTE, &data_string);
+ base::CodepageToWide(std::string(data, length), base::kCodepageUTF8,
+ base::OnStringConversionError::SUBSTITUTE, &data_string);
const wchar_t* p = data_string.c_str();
const wchar_t* end = p + data_string.length();
diff --git a/webkit/glue/ftp_directory_listing_response_delegate.cc b/webkit/glue/ftp_directory_listing_response_delegate.cc
index c11fdbd..3ff9c0f 100644
--- a/webkit/glue/ftp_directory_listing_response_delegate.cc
+++ b/webkit/glue/ftp_directory_listing_response_delegate.cc
@@ -6,6 +6,7 @@
#include <vector>
+#include "base/i18n/icu_string_conversions.h"
#include "base/logging.h"
#include "base/string_util.h"
#include "base/sys_string_conversions.h"
@@ -53,8 +54,9 @@ string16 RawByteSequenceToFilename(const char* raw_filename,
// Using the native codepage does not make much sense, but we don't have
// much else to resort to.
string16 filename;
- if (!CodepageToUTF16(raw_filename, encoding.c_str(),
- OnStringUtilConversionError::SUBSTITUTE, &filename))
+ if (!base::CodepageToUTF16(raw_filename, encoding.c_str(),
+ base::OnStringConversionError::SUBSTITUTE,
+ &filename))
filename = WideToUTF16Hack(base::SysNativeMBToWide(raw_filename));
return filename;
}
@@ -226,9 +228,9 @@ void FtpDirectoryListingResponseDelegate::Init() {
// Try the detected encoding. If it fails, resort to the
// OS native encoding.
if (encoding.empty() ||
- !CodepageToUTF16(unescaped_path, encoding.c_str(),
- OnStringUtilConversionError::SUBSTITUTE,
- &path_utf16))
+ !base::CodepageToUTF16(unescaped_path, encoding.c_str(),
+ base::OnStringConversionError::SUBSTITUTE,
+ &path_utf16))
path_utf16 = WideToUTF16Hack(base::SysNativeMBToWide(unescaped_path));
}