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

Unified Diff: base/stringprintf.h

Issue 10800078: Remove wchar_t versions of StringPrintf from Android (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: First cut, compiles on Android Created 8 years, 5 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 | « no previous file | base/stringprintf.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/stringprintf.h
diff --git a/base/stringprintf.h b/base/stringprintf.h
index 40ad107aead14fd3af62aeafb63f6aae21ac861a..9f2463b2dd7f62399c8e6bfa54c0aeb992c76144 100644
--- a/base/stringprintf.h
+++ b/base/stringprintf.h
@@ -17,9 +17,6 @@ namespace base {
// Return a C++ string given printf-like input.
BASE_EXPORT std::string StringPrintf(const char* format, ...)
PRINTF_FORMAT(1, 2);
-BASE_EXPORT std::wstring StringPrintf(const wchar_t* format, ...)
- WPRINTF_FORMAT(1, 2);
-
// Return a C++ string given vprintf-like input.
BASE_EXPORT std::string StringPrintV(const char* format, va_list ap)
PRINTF_FORMAT(1, 0);
@@ -28,25 +25,34 @@ BASE_EXPORT std::string StringPrintV(const char* format, va_list ap)
BASE_EXPORT const std::string& SStringPrintf(std::string* dst,
const char* format, ...)
PRINTF_FORMAT(2, 3);
-BASE_EXPORT const std::wstring& SStringPrintf(std::wstring* dst,
- const wchar_t* format, ...)
- WPRINTF_FORMAT(2, 3);
// Append result to a supplied string.
BASE_EXPORT void StringAppendF(std::string* dst, const char* format, ...)
jar (doing other things) 2012/07/24 18:15:34 This is interesting.... it was previously only adv
Iain Merrick 2012/07/25 10:57:23 Hmm, probably more interesting than I intended! I'
PRINTF_FORMAT(2, 3);
-// TODO(evanm): this is only used in a few places in the code;
-// replace with string16 version.
-BASE_EXPORT void StringAppendF(std::wstring* dst, const wchar_t* format, ...)
- WPRINTF_FORMAT(2, 3);
// Lower-level routine that takes a va_list and appends to a specified
// string. All other routines are just convenience wrappers around it.
BASE_EXPORT void StringAppendV(std::string* dst, const char* format, va_list ap)
PRINTF_FORMAT(2, 0);
+
+// wchar_t variants of above functions. Not supported by Android's libc.
+#if !defined(OS_ANDROID)
jar (doing other things) 2012/07/24 18:15:34 IMO, this grouping (by whether we're Android or no
Iain Merrick 2012/07/25 10:57:23 Sure, no problem! I considered both and made the o
jar (doing other things) 2012/07/25 18:54:04 Mixed feelings: Macros are frowned upon. If you
Iain Merrick 2012/07/26 11:15:56 Done.
+BASE_EXPORT std::wstring StringPrintf(const wchar_t* format, ...)
+ WPRINTF_FORMAT(1, 2);
+
+BASE_EXPORT const std::wstring& SStringPrintf(std::wstring* dst,
+ const wchar_t* format, ...)
+ WPRINTF_FORMAT(2, 3);
+
+// TODO(evanm): this is only used in a few places in the code;
+// replace with string16 version.
+BASE_EXPORT void StringAppendF(std::wstring* dst, const wchar_t* format, ...)
+ WPRINTF_FORMAT(2, 3);
+
BASE_EXPORT void StringAppendV(std::wstring* dst,
const wchar_t* format, va_list ap)
WPRINTF_FORMAT(2, 0);
+#endif
} // namespace base
« no previous file with comments | « no previous file | base/stringprintf.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698