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

Unified Diff: net/spdy/spdy_test_utils.h

Issue 425803014: Refactor pooling logic into a helper method (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add QUIC test Created 6 years, 4 months 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/spdy/spdy_test_utils.h
diff --git a/net/spdy/spdy_test_utils.h b/net/spdy/spdy_test_utils.h
index 439311e2c16a95456109d35c9a90490bbc6c41ca..5abbf00a56ab1804e04f09a62d6cfc48c6ffec39 100644
--- a/net/spdy/spdy_test_utils.h
+++ b/net/spdy/spdy_test_utils.h
@@ -7,6 +7,8 @@
#include <string>
+#include "net/base/hash_value.h"
Ryan Sleevi 2014/08/11 18:45:17 Can forward declare this. See http://www.chromium
Ryan Hamilton 2014/08/12 14:39:06 Whoa! You forward declare if it's used as a return
Ryan Sleevi 2014/08/12 14:52:03 Yup. That's exactly it - you don't need to know th
+#include "net/http/transport_security_state.h"
Ryan Sleevi 2014/08/11 18:45:17 Can forward declare this - only used as a pointer.
Ryan Hamilton 2014/08/12 14:39:06 Done.
#include "net/spdy/spdy_protocol.h"
namespace net {
@@ -33,6 +35,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 label);
Ryan Sleevi 2014/08/11 18:45:17 1) These should be using uint8_t, not uint8, in SP
Ryan Hamilton 2014/08/12 14:39:06 I'm not sure I follow? We use basictypes all the t
Ryan Sleevi 2014/08/12 14:52:03 Basictypes is deprecated in Chrome. It existed bec
Ryan Hamilton 2014/08/12 15:37:10 *sigh* I "love" it that we deprecate stuff but don
+
+// Returns SHA1 pinning header for the of the base64 encoding of
+// GetTestHashValue(|label|).
+std::string GetTestPin(uint8 label);
+
+// Adds a pin for |host| to |state|.
+void AddPin(TransportSecurityState* state,
+ const std::string& host,
+ uint8 primary_label,
+ uint8 backup_label);
+
} // namespace test
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698