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 /chrome/browser/search_engines | |
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 'chrome/browser/search_engines')
-rw-r--r-- | chrome/browser/search_engines/template_url.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/chrome/browser/search_engines/template_url.cc b/chrome/browser/search_engines/template_url.cc index 7c57617..3febf96 100644 --- a/chrome/browser/search_engines/template_url.cc +++ b/chrome/browser/search_engines/template_url.cc @@ -6,6 +6,7 @@ #include "app/gfx/favicon_size.h" #include "app/l10n_util.h" +#include "base/i18n/icu_string_conversions.h" #include "base/logging.h" #include "base/string_util.h" #include "chrome/browser/browser_process.h" @@ -318,8 +319,9 @@ std::wstring TemplateURLRef::ReplaceSearchTerms( case GOOGLE_UNESCAPED_SEARCH_TERMS: { std::string unescaped_terms; - WideToCodepage(terms, WideToASCII(input_encoding).c_str(), - OnStringUtilConversionError::SKIP, &unescaped_terms); + base::WideToCodepage(terms, WideToASCII(input_encoding).c_str(), + base::OnStringConversionError::SKIP, + &unescaped_terms); url.insert(i->index, std::wstring(unescaped_terms.begin(), unescaped_terms.end())); break; @@ -411,14 +413,14 @@ std::wstring TemplateURLRef::SearchTermToWide(const TemplateURL& host, UnescapeURLComponent(term, UnescapeRule::REPLACE_PLUS_WITH_SPACE | UnescapeRule::URL_SPECIAL_CHARS); for (size_t i = 0; i < encodings.size(); ++i) { - if (CodepageToWide(unescaped, encodings[i].c_str(), - OnStringUtilConversionError::FAIL, &result)) + if (base::CodepageToWide(unescaped, encodings[i].c_str(), + base::OnStringConversionError::FAIL, &result)) return result; } // Always fall back on UTF-8 if it works. - if (CodepageToWide(unescaped, "UTF-8", - OnStringUtilConversionError::FAIL, &result)) + if (base::CodepageToWide(unescaped, base::kCodepageUTF8, + base::OnStringConversionError::FAIL, &result)) return result; // When nothing worked, just use the escaped text. We have no idea what the |