Pull the new r369476 of base library from Chromium
The merge was done against r369476 which corresponds to git commit
0471d0e2e2ef4a544a63481a389e1df33ea7c00a of Jan 14, 2016
Change-Id: Ie6894cf65424cc5ad115110faccd51602b2d1234
Reviewed-on: https://weave-review.googlesource.com/2225
Reviewed-by: Alex Vakulenko <avakulenko@google.com>
diff --git a/third_party/chromium/crypto/p224.h b/third_party/chromium/crypto/p224.h
index 7574389..e9976e6 100644
--- a/third_party/chromium/crypto/p224.h
+++ b/third_party/chromium/crypto/p224.h
@@ -5,9 +5,12 @@
#ifndef LIBWEAVE_THIRD_PARTY_CHROMIUM_P224_H_
#define LIBWEAVE_THIRD_PARTY_CHROMIUM_P224_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <string>
-#include <base/basictypes.h>
+#include "base/strings/string_piece.h"
namespace crypto {
@@ -17,14 +20,14 @@
// An element of the field (ℤ/pℤ) is represented with 8, 28-bit limbs in
// little endian order.
-typedef uint32 FieldElement[8];
+typedef uint32_t FieldElement[8];
struct Point {
// SetFromString the value of the point from the 56 byte, external
// representation. The external point representation is an (x, y) pair of a
// point on the curve. Each field element is represented as a big-endian
// number < p.
- bool SetFromString(const std::string& in);
+ bool SetFromString(const base::StringPiece& in);
// ToString returns an external representation of the Point.
std::string ToString() const;
@@ -39,11 +42,11 @@
// ScalarMult computes *out = in*scalar where scalar is a 28-byte, big-endian
// number.
-void ScalarMult(const Point& in, const uint8* scalar, Point* out);
+void ScalarMult(const Point& in, const uint8_t* scalar, Point* out);
// ScalarBaseMult computes *out = g*scalar where g is the base point of the
// curve and scalar is a 28-byte, big-endian number.
-void ScalarBaseMult(const uint8* scalar, Point* out);
+void ScalarBaseMult(const uint8_t* scalar, Point* out);
// Add computes *out = a+b.
void Add(const Point& a, const Point& b, Point* out);
@@ -52,6 +55,7 @@
void Negate(const Point& a, Point* out);
} // namespace p224
+
} // namespace crypto
#endif // LIBWEAVE_THIRD_PARTY_CHROMIUM_P224_H_