OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_SPDY_TEST_UTIL_COMMON_H_ | 5 #ifndef NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ |
6 #define NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ | 6 #define NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "crypto/ec_private_key.h" | 10 #include "crypto/ec_private_key.h" |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 // will vary the most between calls. If |direct| is false, the | 377 // will vary the most between calls. If |direct| is false, the |
378 // the full url will be used instead of simply the path. | 378 // the full url will be used instead of simply the path. |
379 // Returns a SpdyFrame. | 379 // Returns a SpdyFrame. |
380 SpdyFrame* ConstructSpdyGet(const char* const extra_headers[], | 380 SpdyFrame* ConstructSpdyGet(const char* const extra_headers[], |
381 int extra_header_count, | 381 int extra_header_count, |
382 bool compressed, | 382 bool compressed, |
383 int stream_id, | 383 int stream_id, |
384 RequestPriority request_priority, | 384 RequestPriority request_priority, |
385 bool direct) const; | 385 bool direct) const; |
386 | 386 |
| 387 // Constructs a standard SPDY SYN_STREAM frame for a CONNECT request. |
| 388 SpdyFrame* ConstructSpdyConnect(const char* const extra_headers[], |
| 389 int extra_header_count, |
| 390 int stream_id) const; |
| 391 |
387 NextProto protocol() const { return protocol_; } | 392 NextProto protocol() const { return protocol_; } |
388 SpdyMajorVersion spdy_version() const { return spdy_version_; } | 393 SpdyMajorVersion spdy_version() const { return spdy_version_; } |
389 bool is_spdy2() const { return protocol_ < kProtoSPDY3; } | 394 bool is_spdy2() const { return protocol_ < kProtoSPDY3; } |
390 scoped_ptr<SpdyFramer> CreateFramer() const; | 395 scoped_ptr<SpdyFramer> CreateFramer() const; |
391 | 396 |
392 private: | 397 private: |
393 const NextProto protocol_; | 398 const NextProto protocol_; |
394 const SpdyMajorVersion spdy_version_; | 399 const SpdyMajorVersion spdy_version_; |
395 }; | 400 }; |
396 | 401 |
397 } // namespace net | 402 } // namespace net |
398 | 403 |
399 #endif // NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ | 404 #endif // NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ |
OLD | NEW |