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

Unified Diff: base/sys_info_chromeos.cc

Issue 8921006: Standardize StringToInt{,64} interface. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix call syntax of StringToInt() in Chrome OS 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 | « base/string_piece.h ('k') | chrome/browser/autocomplete_history_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/sys_info_chromeos.cc
diff --git a/base/sys_info_chromeos.cc b/base/sys_info_chromeos.cc
index f1c6664fabd4edb8a72dd3498eeb53ae939ceac2..f84a2a5f81ba78469895b0275f1bd672f379466e 100644
--- a/base/sys_info_chromeos.cc
+++ b/base/sys_info_chromeos.cc
@@ -9,6 +9,7 @@
#include "base/file_util.h"
#include "base/lazy_instance.h"
#include "base/string_number_conversions.h"
+#include "base/string_piece.h"
#include "base/string_tokenizer.h"
#include "base/threading/thread_restrictions.h"
@@ -96,17 +97,17 @@ void SysInfo::ParseLsbRelease(const std::string& lsb_release,
StringTokenizer tokenizer(version, ".");
for (int i = 0; i < 3 && tokenizer.GetNext(); ++i) {
if (0 == i) {
- StringToInt(tokenizer.token_begin(),
- tokenizer.token_end(),
+ StringToInt(StringPiece(tokenizer.token_begin(),
+ tokenizer.token_end()),
major_version);
*minor_version = *bugfix_version = 0;
} else if (1 == i) {
- StringToInt(tokenizer.token_begin(),
- tokenizer.token_end(),
+ StringToInt(StringPiece(tokenizer.token_begin(),
+ tokenizer.token_end()),
minor_version);
} else { // 2 == i
- StringToInt(tokenizer.token_begin(),
- tokenizer.token_end(),
+ StringToInt(StringPiece(tokenizer.token_begin(),
+ tokenizer.token_end()),
bugfix_version);
}
}
« no previous file with comments | « base/string_piece.h ('k') | chrome/browser/autocomplete_history_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698