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

Unified Diff: base/mac/mac_util.mm

Issue 8921006: Standardize StringToInt{,64} interface. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix uses of StringToInt() in Windows and Mac code. Created 9 years 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 | « AUTHORS ('k') | base/string_number_conversions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/mac/mac_util.mm
diff --git a/base/mac/mac_util.mm b/base/mac/mac_util.mm
index 66fbf117b572877d0d0b3ef988d22b944869937f..1e11ef44b120486dae352acfac7c772d70395533 100644
--- a/base/mac/mac_util.mm
+++ b/base/mac/mac_util.mm
@@ -14,6 +14,7 @@
#include "base/mac/scoped_cftyperef.h"
#include "base/memory/scoped_nsobject.h"
#include "base/string_number_conversions.h"
+#include "base/string_piece.h"
#include "base/sys_string_conversions.h"
namespace base {
@@ -521,7 +522,8 @@ int DarwinMajorVersionInternal() {
int darwin_major_version = 0;
char* dot = strchr(uname_info.release, '.');
if (dot) {
- if (!base::StringToInt(uname_info.release, dot, &darwin_major_version)) {
+ if (!base::StringToInt(base::StringPiece(uname_info.release, dot),
erikwright (departed) 2011/12/16 03:56:33 Does this work because a std::string::iterator is
+ &darwin_major_version)) {
dot = NULL;
}
}
« no previous file with comments | « AUTHORS ('k') | base/string_number_conversions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698