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

Unified Diff: webkit/glue/plugins/plugin_list_win.cc

Issue 3056029: Move the number conversions from string_util to a new file.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 | « webkit/glue/plugins/plugin_instance.cc ('k') | webkit/glue/plugins/webplugin_delegate_impl_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/plugin_list_win.cc
===================================================================
--- webkit/glue/plugins/plugin_list_win.cc (revision 54340)
+++ webkit/glue/plugins/plugin_list_win.cc (working copy)
@@ -14,6 +14,7 @@
#include "base/path_service.h"
#include "base/registry.h"
#include "base/scoped_ptr.h"
+#include "base/string_number_conversions.h"
#include "base/string_util.h"
#include "webkit/glue/plugins/plugin_constants_win.h"
#include "webkit/glue/plugins/plugin_lib.h"
@@ -313,8 +314,10 @@
if (a_ver.size() != b_ver.size())
return false;
for (size_t i = 0; i < a_ver.size(); i++) {
- int cur_a = StringToInt(a_ver[i]);
- int cur_b = StringToInt(b_ver[i]);
+ int cur_a, cur_b;
+ base::StringToInt(a_ver[i], &cur_a);
+ base::StringToInt(b_ver[i], &cur_b);
+
if (cur_a > cur_b)
return false;
if (cur_a < cur_b)
@@ -370,9 +373,9 @@
SplitString(info.version, '.', &ver);
int major, minor, update;
if (ver.size() == 4 &&
- StringToInt(ver[0], &major) &&
- StringToInt(ver[1], &minor) &&
- StringToInt(ver[2], &update)) {
+ base::StringToInt(ver[0], &major) &&
+ base::StringToInt(ver[1], &minor) &&
+ base::StringToInt(ver[2], &update)) {
if (major == 6 && minor == 0 && update < 120)
return false; // Java SE6 Update 11 or older.
}
« no previous file with comments | « webkit/glue/plugins/plugin_instance.cc ('k') | webkit/glue/plugins/webplugin_delegate_impl_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698