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

Side by Side Diff: net/spdy/spdy_protocol.cc

Issue 267113005: SPDY size utility method. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/spdy/spdy_protocol.h ('k') | no next file » | 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) 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 #include "net/spdy/spdy_protocol.h" 5 #include "net/spdy/spdy_protocol.h"
6 6
7 namespace net { 7 namespace net {
8 8
9 SpdyFrameWithNameValueBlockIR::SpdyFrameWithNameValueBlockIR( 9 SpdyFrameWithNameValueBlockIR::SpdyFrameWithNameValueBlockIR(
10 SpdyStreamId stream_id) : SpdyFrameWithFinIR(stream_id) {} 10 SpdyStreamId stream_id) : SpdyFrameWithFinIR(stream_id) {}
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 size_t SpdyConstants::GetFrameMaximumSize(SpdyMajorVersion version) { 699 size_t SpdyConstants::GetFrameMaximumSize(SpdyMajorVersion version) {
700 if (version < SPDY4) { 700 if (version < SPDY4) {
701 // 24-bit length field plus eight-byte frame header. 701 // 24-bit length field plus eight-byte frame header.
702 return ((1<<24) - 1) + 8; 702 return ((1<<24) - 1) + 8;
703 } else { 703 } else {
704 // 14-bit length field. 704 // 14-bit length field.
705 return (1<<14) - 1; 705 return (1<<14) - 1;
706 } 706 }
707 } 707 }
708 708
709 size_t SpdyConstants::GetSizeOfSizeField(SpdyMajorVersion version) {
710 return (version < SPDY3) ? sizeof(uint16) : sizeof(uint32);
711 }
712
709 void SpdyDataIR::Visit(SpdyFrameVisitor* visitor) const { 713 void SpdyDataIR::Visit(SpdyFrameVisitor* visitor) const {
710 return visitor->VisitData(*this); 714 return visitor->VisitData(*this);
711 } 715 }
712 716
713 void SpdySynStreamIR::Visit(SpdyFrameVisitor* visitor) const { 717 void SpdySynStreamIR::Visit(SpdyFrameVisitor* visitor) const {
714 return visitor->VisitSynStream(*this); 718 return visitor->VisitSynStream(*this);
715 } 719 }
716 720
717 void SpdySynReplyIR::Visit(SpdyFrameVisitor* visitor) const { 721 void SpdySynReplyIR::Visit(SpdyFrameVisitor* visitor) const {
718 return visitor->VisitSynReply(*this); 722 return visitor->VisitSynReply(*this);
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 782
779 void SpdyPushPromiseIR::Visit(SpdyFrameVisitor* visitor) const { 783 void SpdyPushPromiseIR::Visit(SpdyFrameVisitor* visitor) const {
780 return visitor->VisitPushPromise(*this); 784 return visitor->VisitPushPromise(*this);
781 } 785 }
782 786
783 void SpdyContinuationIR::Visit(SpdyFrameVisitor* visitor) const { 787 void SpdyContinuationIR::Visit(SpdyFrameVisitor* visitor) const {
784 return visitor->VisitContinuation(*this); 788 return visitor->VisitContinuation(*this);
785 } 789 }
786 790
787 } // namespace net 791 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_protocol.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698