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

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

Issue 8898003: Deprecate SpdyControlFrame::size in favor of SpdyControlFrame::kHeaderSize (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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_framer_test.cc ('k') | net/spdy/spdy_protocol_test.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // This file contains some protocol structures for use with Spdy. 5 // This file contains some protocol structures for use with Spdy.
6 6
7 #ifndef NET_SPDY_SPDY_PROTOCOL_H_ 7 #ifndef NET_SPDY_SPDY_PROTOCOL_H_
8 #define NET_SPDY_SPDY_PROTOCOL_H_ 8 #define NET_SPDY_SPDY_PROTOCOL_H_
9 #pragma once 9 #pragma once
10 10
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 DCHECK(type >= SYN_STREAM && type < NUM_CONTROL_FRAME_TYPES); 463 DCHECK(type >= SYN_STREAM && type < NUM_CONTROL_FRAME_TYPES);
464 mutable_block()->control_.type_ = htons(type); 464 mutable_block()->control_.type_ = htons(type);
465 } 465 }
466 466
467 // Returns true if this control frame is of a type that has a header block, 467 // Returns true if this control frame is of a type that has a header block,
468 // otherwise it returns false. 468 // otherwise it returns false.
469 bool has_header_block() const { 469 bool has_header_block() const {
470 return type() == SYN_STREAM || type() == SYN_REPLY || type() == HEADERS; 470 return type() == SYN_STREAM || type() == SYN_REPLY || type() == HEADERS;
471 } 471 }
472 472
473 // Returns the size of the SpdyFrameBlock structure.
474 // Note: this is not the size of the SpdyControlFrame class.
475 static size_t size() { return sizeof(SpdyFrameBlock); }
476
477 // The size of the 'Number of Name/Value pairs' field in a Name/Value block. 473 // The size of the 'Number of Name/Value pairs' field in a Name/Value block.
478 static const size_t kNumNameValuePairsSize = 2; 474 static const size_t kNumNameValuePairsSize = 2;
479 475
480 // The size of the 'Length of a name' field in a Name/Value block. 476 // The size of the 'Length of a name' field in a Name/Value block.
481 static const size_t kLengthOfNameSize = 2; 477 static const size_t kLengthOfNameSize = 2;
482 478
483 // The size of the 'Length of a value' field in a Name/Value block. 479 // The size of the 'Length of a value' field in a Name/Value block.
484 static const size_t kLengthOfValueSize = 2; 480 static const size_t kLengthOfValueSize = 2;
485 481
486 private: 482 private:
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 struct SpdyWindowUpdateControlFrameBlock* mutable_block() { 785 struct SpdyWindowUpdateControlFrameBlock* mutable_block() {
790 return static_cast<SpdyWindowUpdateControlFrameBlock*>(frame_); 786 return static_cast<SpdyWindowUpdateControlFrameBlock*>(frame_);
791 } 787 }
792 788
793 DISALLOW_COPY_AND_ASSIGN(SpdyWindowUpdateControlFrame); 789 DISALLOW_COPY_AND_ASSIGN(SpdyWindowUpdateControlFrame);
794 }; 790 };
795 791
796 } // namespace spdy 792 } // namespace spdy
797 793
798 #endif // NET_SPDY_SPDY_PROTOCOL_H_ 794 #endif // NET_SPDY_SPDY_PROTOCOL_H_
OLDNEW
« no previous file with comments | « net/spdy/spdy_framer_test.cc ('k') | net/spdy/spdy_protocol_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698