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

Side by Side Diff: net/spdy/spdy_test_util_common.h

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « net/spdy/spdy_stream_unittest.cc ('k') | net/spdy/spdy_test_util_common.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 544
545 // For versions below SPDY4, adds the version HTTP/1.1 header. 545 // For versions below SPDY4, adds the version HTTP/1.1 header.
546 void MaybeAddVersionHeader(SpdyFrameWithNameValueBlockIR* frame_ir) const; 546 void MaybeAddVersionHeader(SpdyFrameWithNameValueBlockIR* frame_ir) const;
547 void MaybeAddVersionHeader(SpdyHeaderBlock* block) const; 547 void MaybeAddVersionHeader(SpdyHeaderBlock* block) const;
548 548
549 // Maps |priority| to SPDY version priority, and sets it on |frame_ir|. 549 // Maps |priority| to SPDY version priority, and sets it on |frame_ir|.
550 void SetPriority(RequestPriority priority, SpdySynStreamIR* frame_ir) const; 550 void SetPriority(RequestPriority priority, SpdySynStreamIR* frame_ir) const;
551 551
552 NextProto protocol() const { return protocol_; } 552 NextProto protocol() const { return protocol_; }
553 SpdyMajorVersion spdy_version() const { return spdy_version_; } 553 SpdyMajorVersion spdy_version() const { return spdy_version_; }
554 bool is_spdy2() const { return protocol_ < kProtoSPDY3; }
555 bool include_version_header() const { 554 bool include_version_header() const {
556 return protocol_ < kProtoSPDY4MinimumVersion; 555 return protocol_ < kProtoSPDY4MinimumVersion;
557 } 556 }
558 scoped_ptr<SpdyFramer> CreateFramer(bool compressed) const; 557 scoped_ptr<SpdyFramer> CreateFramer(bool compressed) const;
559 558
560 const char* GetMethodKey() const; 559 const char* GetMethodKey() const;
561 const char* GetStatusKey() const; 560 const char* GetStatusKey() const;
562 const char* GetHostKey() const; 561 const char* GetHostKey() const;
563 const char* GetSchemeKey() const; 562 const char* GetSchemeKey() const;
564 const char* GetVersionKey() const; 563 const char* GetVersionKey() const;
565 const char* GetPathKey() const; 564 const char* GetPathKey() const;
566 565
567 private: 566 private:
568 // |content_length| may be NULL, in which case the content-length 567 // |content_length| may be NULL, in which case the content-length
569 // header will be omitted. 568 // header will be omitted.
570 scoped_ptr<SpdyHeaderBlock> ConstructHeaderBlock( 569 scoped_ptr<SpdyHeaderBlock> ConstructHeaderBlock(
571 base::StringPiece method, 570 base::StringPiece method,
572 base::StringPiece url, 571 base::StringPiece url,
573 int64* content_length) const; 572 int64* content_length) const;
574 573
575 const NextProto protocol_; 574 const NextProto protocol_;
576 const SpdyMajorVersion spdy_version_; 575 const SpdyMajorVersion spdy_version_;
577 }; 576 };
578 577
579 } // namespace net 578 } // namespace net
580 579
581 #endif // NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ 580 #endif // NET_SPDY_SPDY_TEST_UTIL_COMMON_H_
OLDNEW
« no previous file with comments | « net/spdy/spdy_stream_unittest.cc ('k') | net/spdy/spdy_test_util_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698