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

Unified Diff: third_party/crashpad/crashpad/util/stdlib/string_number_conversion.cc

Issue 2555353002: Update Crashpad to 32981a3ee9d7c2769fb27afa038fe2e194cfa329 (Closed)
Patch Set: fix readme Created 4 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: third_party/crashpad/crashpad/util/stdlib/string_number_conversion.cc
diff --git a/third_party/crashpad/crashpad/util/stdlib/string_number_conversion.cc b/third_party/crashpad/crashpad/util/stdlib/string_number_conversion.cc
index 28f6ea11b60bbc7e056bce9aa1c11a465301a0a0..65d5a63278c4d39acf3ee68666cb65b1410663e6 100644
--- a/third_party/crashpad/crashpad/util/stdlib/string_number_conversion.cc
+++ b/third_party/crashpad/crashpad/util/stdlib/string_number_conversion.cc
@@ -110,6 +110,13 @@ struct StringToUnsignedIntTraits
}
};
+struct StringToInt64Traits
+ : public StringToSignedIntegerTraits<int64_t, int64_t> {
+ static LongType Convert(const char* str, char** end, int base) {
+ return strtoll(str, end, base);
+ }
+};
+
struct StringToUnsignedInt64Traits
: public StringToUnsignedIntegerTraits<uint64_t, uint64_t> {
static LongType Convert(const char* str, char** end, int base) {
@@ -166,6 +173,10 @@ bool StringToNumber(const base::StringPiece& string, unsigned int* number) {
return StringToIntegerInternal<StringToUnsignedIntTraits>(string, number);
}
+bool StringToNumber(const base::StringPiece& string, int64_t* number) {
+ return StringToIntegerInternal<StringToInt64Traits>(string, number);
+}
+
bool StringToNumber(const base::StringPiece& string, uint64_t* number) {
return StringToIntegerInternal<StringToUnsignedInt64Traits>(string, number);
}

Powered by Google App Engine
This is Rietveld 408576698