OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_SPDY_TEST_UTILS_H_ | 5 #ifndef NET_SPDY_TEST_UTILS_H_ |
6 #define NET_SPDY_TEST_UTILS_H_ | 6 #define NET_SPDY_TEST_UTILS_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "net/spdy/spdy_header_block.h" | 12 #include "net/spdy/spdy_header_block.h" |
13 #include "net/spdy/spdy_protocol.h" | 13 #include "net/spdy/spdy_protocol.h" |
14 | 14 |
15 namespace net { | 15 namespace net { |
16 | 16 |
17 class HashValue; | 17 class HashValue; |
18 class TransportSecurityState; | 18 class TransportSecurityState; |
19 | 19 |
20 inline bool operator==(StringPiece x, | 20 inline bool operator==(base::StringPiece x, |
21 const SpdyHeaderBlock::StringPieceProxy& y) { | 21 const SpdyHeaderBlock::StringPieceProxy& y) { |
22 return x == y.operator StringPiece(); | 22 return x == y.operator base::StringPiece(); |
23 } | 23 } |
24 | 24 |
25 namespace test { | 25 namespace test { |
26 | 26 |
27 std::string HexDumpWithMarks(const unsigned char* data, int length, | 27 std::string HexDumpWithMarks(const unsigned char* data, int length, |
28 const bool* marks, int mark_length); | 28 const bool* marks, int mark_length); |
29 | 29 |
30 void CompareCharArraysWithHexError( | 30 void CompareCharArraysWithHexError( |
31 const std::string& description, | 31 const std::string& description, |
32 const unsigned char* actual, | 32 const unsigned char* actual, |
(...skipping 21 matching lines...) Expand all Loading... |
54 // Adds a pin for |host| to |state|. | 54 // Adds a pin for |host| to |state|. |
55 void AddPin(TransportSecurityState* state, | 55 void AddPin(TransportSecurityState* state, |
56 const std::string& host, | 56 const std::string& host, |
57 uint8_t primary_label, | 57 uint8_t primary_label, |
58 uint8_t backup_label); | 58 uint8_t backup_label); |
59 | 59 |
60 } // namespace test | 60 } // namespace test |
61 } // namespace net | 61 } // namespace net |
62 | 62 |
63 #endif // NET_SPDY_TEST_UTILS_H_ | 63 #endif // NET_SPDY_TEST_UTILS_H_ |
OLD | NEW |