Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1545)

Unified Diff: app/l10n_util.cc

Issue 6156001: Remove wstring from l10n_util. Part 8, the last part.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « app/l10n_util.h ('k') | app/l10n_util_collator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/l10n_util.cc
===================================================================
--- app/l10n_util.cc (revision 70736)
+++ app/l10n_util.cc (working copy)
@@ -568,12 +568,6 @@
return true;
}
-#if CRBUG_9911_OBSOLETE_GOING_AWAY
-std::wstring GetString(int message_id) {
- return UTF16ToWide(GetStringUTF16(message_id));
-}
-#endif
-
std::string GetStringUTF8(int message_id) {
return UTF16ToUTF8(GetStringUTF16(message_id));
}
@@ -630,38 +624,6 @@
return formatted;
}
-#if CRBUG_9911_OBSOLETE_GOING_AWAY
-#if !defined(WCHAR_T_IS_UTF16)
-std::wstring GetStringF(int message_id, const std::wstring& a) {
- return UTF16ToWide(GetStringFUTF16(message_id, WideToUTF16(a)));
-}
-
-std::wstring GetStringF(int message_id,
- const std::wstring& a,
- const std::wstring& b) {
- return UTF16ToWide(GetStringFUTF16(message_id, WideToUTF16(a),
- WideToUTF16(b)));
-}
-
-std::wstring GetStringF(int message_id,
- const std::wstring& a,
- const std::wstring& b,
- const std::wstring& c) {
- return UTF16ToWide(GetStringFUTF16(message_id, WideToUTF16(a),
- WideToUTF16(b), WideToUTF16(c)));
-}
-
-std::wstring GetStringF(int message_id,
- const std::wstring& a,
- const std::wstring& b,
- const std::wstring& c,
- const std::wstring& d) {
- return UTF16ToWide(GetStringFUTF16(message_id, WideToUTF16(a), WideToUTF16(b),
- WideToUTF16(c), WideToUTF16(d)));
-}
-#endif
-#endif
-
std::string GetStringFUTF8(int message_id,
const string16& a) {
return UTF16ToUTF8(GetStringFUTF16(message_id, a));
@@ -725,29 +687,6 @@
return GetStringF(message_id, replacements, NULL);
}
-#if CRBUG_9911_OBSOLETE_GOING_AWAY
-std::wstring GetStringF(int message_id, const std::wstring& a, size_t* offset) {
- DCHECK(offset);
- std::vector<size_t> offsets;
- std::vector<string16> replacements;
- replacements.push_back(WideToUTF16(a));
- string16 result = GetStringF(message_id, replacements, &offsets);
- DCHECK(offsets.size() == 1);
- *offset = offsets[0];
- return UTF16ToWide(result);
-}
-
-std::wstring GetStringF(int message_id,
- const std::wstring& a,
- const std::wstring& b,
- std::vector<size_t>* offsets) {
- std::vector<string16> replacements;
- replacements.push_back(WideToUTF16(a));
- replacements.push_back(WideToUTF16(b));
- return UTF16ToWide(GetStringF(message_id, replacements, offsets));
-}
-#endif
-
string16 GetStringFUTF16(int message_id, const string16& a, size_t* offset) {
DCHECK(offset);
std::vector<size_t> offsets;
@@ -769,16 +708,6 @@
return GetStringF(message_id, replacements, offsets);
}
-#if CRBUG_9911_OBSOLETE_GOING_AWAY
-std::wstring GetStringF(int message_id, int a) {
- return GetStringF(message_id, UTF8ToWide(base::IntToString(a)));
-}
-
-std::wstring GetStringF(int message_id, int64 a) {
- return GetStringF(message_id, UTF8ToWide(base::Int64ToString(a)));
-}
-#endif
-
string16 GetStringFUTF16Int(int message_id, int a) {
return GetStringFUTF16(message_id, UTF8ToUTF16(base::IntToString(a)));
}
@@ -883,26 +812,6 @@
return result;
}
-// Compares the character data stored in two different std:wstring strings by
-// specified Collator instance.
-UCollationResult CompareStringWithCollator(const icu::Collator* collator,
- const std::wstring& lhs,
- const std::wstring& rhs) {
- DCHECK(collator);
- UCollationResult result;
-#if defined(WCHAR_T_IS_UTF32)
- // Need to convert to UTF-16 to be compatible with UnicodeString's
- // constructor.
- string16 lhs_utf16 = WideToUTF16(lhs);
- string16 rhs_utf16 = WideToUTF16(rhs);
-
- result = CompareString16WithCollator(collator, lhs_utf16, rhs_utf16);
-#else
- result = CompareString16WithCollator(collator, lhs, rhs);
-#endif
- return result;
-}
-
// Specialization of operator() method for string16 version.
template <>
bool StringComparator<string16>::operator()(const string16& lhs,
« no previous file with comments | « app/l10n_util.h ('k') | app/l10n_util_collator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698