Index: base/string_number_conversions.h |
diff --git a/base/string_number_conversions.h b/base/string_number_conversions.h |
index 54f05b0954327dfdc2c91404a77b7973b079f58c..0c70205900cb7fc72c8f9f5941adf026fbea9d11 100644 |
--- a/base/string_number_conversions.h |
+++ b/base/string_number_conversions.h |
@@ -93,8 +93,15 @@ BASE_EXPORT bool StringToDouble(const std::string& input, double* output); |
BASE_EXPORT std::string HexEncode(const void* bytes, size_t size); |
// Best effort conversion, see StringToInt above for restrictions. |
+// Will only successful parse hex values that will fit into |output|, i.e. |
+// -0x80000000 < |input| < 0x7FFFFFFF. |
BASE_EXPORT bool HexStringToInt(const StringPiece& input, int* output); |
+// Best effort conversion, see StringToInt above for restrictions. |
+// Will only successful parse hex values that will fit into |output|, i.e. |
+// -0x8000000000000000 < |input| < 0x7FFFFFFFFFFFFFFF. |
+BASE_EXPORT bool HexStringToInt64(const StringPiece& input, int64* output); |
+ |
// Similar to the previous functions, except that output is a vector of bytes. |
// |*output| will contain as many bytes as were successfully parsed prior to the |
// error. There is no overflow, but input.size() must be evenly divisible by 2. |