| 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 bool fin, | 543 bool fin, |
| 544 int padding_length); | 544 int padding_length); |
| 545 | 545 |
| 546 // Wraps |frame| in the payload of a data frame in stream |stream_id|. | 546 // Wraps |frame| in the payload of a data frame in stream |stream_id|. |
| 547 SpdyFrame* ConstructWrappedSpdyFrame(const scoped_ptr<SpdyFrame>& frame, | 547 SpdyFrame* ConstructWrappedSpdyFrame(const scoped_ptr<SpdyFrame>& frame, |
| 548 int stream_id); | 548 int stream_id); |
| 549 | 549 |
| 550 const SpdyHeaderInfo MakeSpdyHeader(SpdyFrameType type); | 550 const SpdyHeaderInfo MakeSpdyHeader(SpdyFrameType type); |
| 551 | 551 |
| 552 // For versions below SPDY4, adds the version HTTP/1.1 header. | 552 // For versions below SPDY4, adds the version HTTP/1.1 header. |
| 553 void MaybeAddVersionHeader(SpdyFrameWithNameValueBlockIR* frame_ir) const; | 553 void MaybeAddVersionHeader(SpdyFrameWithHeaderBlockIR* frame_ir) const; |
| 554 void MaybeAddVersionHeader(SpdyHeaderBlock* block) const; | 554 void MaybeAddVersionHeader(SpdyHeaderBlock* block) const; |
| 555 | 555 |
| 556 // Maps |priority| to SPDY version priority, and sets it on |frame_ir|. | 556 // Maps |priority| to SPDY version priority, and sets it on |frame_ir|. |
| 557 void SetPriority(RequestPriority priority, SpdySynStreamIR* frame_ir) const; | 557 void SetPriority(RequestPriority priority, SpdySynStreamIR* frame_ir) const; |
| 558 | 558 |
| 559 NextProto protocol() const { return protocol_; } | 559 NextProto protocol() const { return protocol_; } |
| 560 SpdyMajorVersion spdy_version() const { return spdy_version_; } | 560 SpdyMajorVersion spdy_version() const { return spdy_version_; } |
| 561 bool include_version_header() const { | 561 bool include_version_header() const { |
| 562 return protocol_ < kProtoHTTP2MinimumVersion; | 562 return protocol_ < kProtoHTTP2MinimumVersion; |
| 563 } | 563 } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 582 int64* content_length) const; | 582 int64* content_length) const; |
| 583 | 583 |
| 584 const NextProto protocol_; | 584 const NextProto protocol_; |
| 585 const SpdyMajorVersion spdy_version_; | 585 const SpdyMajorVersion spdy_version_; |
| 586 GURL default_url_; | 586 GURL default_url_; |
| 587 }; | 587 }; |
| 588 | 588 |
| 589 } // namespace net | 589 } // namespace net |
| 590 | 590 |
| 591 #endif // NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ | 591 #endif // NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ |
| OLD | NEW |