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

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

Issue 13845012: [SPDY] Add flag and about:flags entry for SPDY/4 alpha 1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 7 years, 8 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/socket/ssl_client_socket.cc ('k') | net/spdy/spdy_http_stream.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) 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 // TODO(rtenhove) clean up frame buffer size calculations so that we aren't 5 // TODO(rtenhove) clean up frame buffer size calculations so that we aren't
6 // constantly adding and subtracting header sizes; this is ugly and error- 6 // constantly adding and subtracting header sizes; this is ugly and error-
7 // prone. 7 // prone.
8 8
9 #include "net/spdy/spdy_framer.h" 9 #include "net/spdy/spdy_framer.h"
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 // Adler ID for the SPDY header compressor dictionaries. Note that they are 45 // Adler ID for the SPDY header compressor dictionaries. Note that they are
46 // initialized lazily to avoid static initializers. 46 // initialized lazily to avoid static initializers.
47 base::LazyInstance<DictionaryIds>::Leaky g_dictionary_ids; 47 base::LazyInstance<DictionaryIds>::Leaky g_dictionary_ids;
48 48
49 // Used to indicate no flags in a SPDY flags field. 49 // Used to indicate no flags in a SPDY flags field.
50 const uint8 kNoFlags = 0; 50 const uint8 kNoFlags = 0;
51 51
52 } // namespace 52 } // namespace
53 53
54 const int SpdyFramer::kMinSpdyVersion = 2; 54 const int SpdyFramer::kMinSpdyVersion = kSpdyVersion2;
55 const int SpdyFramer::kMaxSpdyVersion = 4; 55 const int SpdyFramer::kMaxSpdyVersion = kSpdyVersion4;
56 const SpdyStreamId SpdyFramer::kInvalidStream = -1; 56 const SpdyStreamId SpdyFramer::kInvalidStream = -1;
57 const size_t SpdyFramer::kHeaderDataChunkMaxSize = 1024; 57 const size_t SpdyFramer::kHeaderDataChunkMaxSize = 1024;
58 // The size of the control frame buffer. Must be >= the minimum size of the 58 // The size of the control frame buffer. Must be >= the minimum size of the
59 // largest control frame, which is SYN_STREAM. See GetSynStreamMinimumSize() for 59 // largest control frame, which is SYN_STREAM. See GetSynStreamMinimumSize() for
60 // calculation details. 60 // calculation details.
61 const size_t SpdyFramer::kControlFrameBufferSize = 18; 61 const size_t SpdyFramer::kControlFrameBufferSize = 18;
62 62
63 #ifdef DEBUG_SPDY_STATE_CHANGES 63 #ifdef DEBUG_SPDY_STATE_CHANGES
64 #define CHANGE_STATE(newstate) \ 64 #define CHANGE_STATE(newstate) \
65 do { \ 65 do { \
(...skipping 1991 matching lines...) Expand 10 before | Expand all | Expand 10 after
2057 post_compress_bytes.Add(compressed_size); 2057 post_compress_bytes.Add(compressed_size);
2058 2058
2059 compressed_frames.Increment(); 2059 compressed_frames.Increment();
2060 2060
2061 if (debug_visitor_ != NULL) { 2061 if (debug_visitor_ != NULL) {
2062 debug_visitor_->OnCompressedHeaderBlock(uncompressed_len, compressed_size); 2062 debug_visitor_->OnCompressedHeaderBlock(uncompressed_len, compressed_size);
2063 } 2063 }
2064 } 2064 }
2065 2065
2066 } // namespace net 2066 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket.cc ('k') | net/spdy/spdy_http_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698