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

Unified Diff: base/json_reader.cc

Issue 28281: Get rid of wstring variants of StringToFoo. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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/string_util.h » ('j') | chrome/browser/bookmarks/bookmark_codec.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/json_reader.cc
===================================================================
--- base/json_reader.cc (revision 10641)
+++ base/json_reader.cc (working copy)
@@ -357,11 +357,12 @@
const std::wstring num_string(token.begin, token.length);
int num_int;
- if (StringToInt(num_string, &num_int))
+ if (StringToInt(WideToUTF16Hack(num_string), &num_int))
return Value::CreateIntegerValue(num_int);
double num_double;
- if (StringToDouble(num_string, &num_double) && base::IsFinite(num_double))
+ if (StringToDouble(WideToUTF16Hack(num_string), &num_double) &&
+ base::IsFinite(num_double))
return Value::CreateRealValue(num_double);
return NULL;
« no previous file with comments | « no previous file | base/string_util.h » ('j') | chrome/browser/bookmarks/bookmark_codec.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698