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

Unified Diff: net/base/x509_cert_types.cc

Issue 8921006: Standardize StringToInt{,64} interface. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix namespace issues. 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
Index: net/base/x509_cert_types.cc
diff --git a/net/base/x509_cert_types.cc b/net/base/x509_cert_types.cc
index 6beb3ecb21e2c4faa777908688b4eb2ee527c526..dacded0d1dd72c68949eaf8faf3897267e4d9b8b 100644
--- a/net/base/x509_cert_types.cc
+++ b/net/base/x509_cert_types.cc
@@ -10,6 +10,8 @@
#include "base/string_piece.h"
#include "base/time.h"
+using base::StringPiece;
cbentzel 2011/12/14 18:15:03 Remove this using declaration.
+
namespace net {
namespace {
@@ -20,7 +22,7 @@ namespace {
// untouched otherwise. Returns the parsed integer.
int ParseIntAndAdvance(const char** field, size_t field_len, bool* ok) {
int result = 0;
- *ok &= base::StringToInt(*field, *field + field_len, &result);
+ *ok &= base::StringToInt(StringPiece(*field, field_len), &result);
*field += field_len;
return result;
}

Powered by Google App Engine
This is Rietveld 408576698