From 528c56de01bbbd38788ed6cf8d2eea4c56cbe19e Mon Sep 17 00:00:00 2001 From: "brettw@chromium.org" Date: Fri, 30 Jul 2010 19:28:44 +0000 Subject: Move the number conversions from string_util to a new file. Use the base namespace in the new file. Update callers. I removed all wstring variants and also the string->number ones that ignore the return value. That encourages people to write code and forget about error handling. TEST=included unit tests BUG=none Review URL: http://codereview.chromium.org/3056029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54355 0039d316-1c4b-4281-b951-d872f2087c98 --- app/l10n_util.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'app/l10n_util.cc') diff --git a/app/l10n_util.cc b/app/l10n_util.cc index 95fd0ee..b3e550f 100644 --- a/app/l10n_util.cc +++ b/app/l10n_util.cc @@ -16,8 +16,7 @@ #include "base/path_service.h" #include "base/scoped_ptr.h" #include "base/string16.h" -#include "base/string_piece.h" -#include "base/string_util.h" +#include "base/string_number_conversions.h" #include "base/sys_string_conversions.h" #include "build/build_config.h" #include "gfx/canvas.h" @@ -648,11 +647,11 @@ string16 GetStringFUTF16(int message_id, } std::wstring GetStringF(int message_id, int a) { - return GetStringF(message_id, IntToWString(a)); + return GetStringF(message_id, UTF8ToWide(base::IntToString(a))); } std::wstring GetStringF(int message_id, int64 a) { - return GetStringF(message_id, Int64ToWString(a)); + return GetStringF(message_id, UTF8ToWide(base::Int64ToString(a))); } std::wstring TruncateString(const std::wstring& string, size_t length) { -- cgit v1.1