Index: net/spdy/spdy_test_utils.h |
diff --git a/net/spdy/spdy_test_utils.h b/net/spdy/spdy_test_utils.h |
index 439311e2c16a95456109d35c9a90490bbc6c41ca..14bc8efbb4cf138d6085f74270b55d3e447dc292 100644 |
--- a/net/spdy/spdy_test_utils.h |
+++ b/net/spdy/spdy_test_utils.h |
@@ -5,12 +5,17 @@ |
#ifndef NET_SPDY_TEST_UTILS_H_ |
#define NET_SPDY_TEST_UTILS_H_ |
+#include <stdint.h> |
+ |
#include <string> |
#include "net/spdy/spdy_protocol.h" |
namespace net { |
+class HashValue; |
+class TransportSecurityState; |
+ |
namespace test { |
std::string HexDumpWithMarks(const unsigned char* data, int length, |
@@ -33,6 +38,19 @@ void SetFrameLength(SpdyFrame* frame, |
std::string a2b_hex(const char* hex_data); |
+// Returns a SHA1 HashValue in which each byte has the value |label|. |
+HashValue GetTestHashValue(uint8_t label); |
+ |
+// Returns SHA1 pinning header for the of the base64 encoding of |
+// GetTestHashValue(|label|). |
+std::string GetTestPin(uint8_t label); |
+ |
+// Adds a pin for |host| to |state|. |
+void AddPin(TransportSecurityState* state, |
+ const std::string& host, |
+ uint8_t primary_label, |
+ uint8_t backup_label); |
+ |
} // namespace test |
} // namespace net |