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

Unified Diff: net/spdy/spdy_framer.h

Issue 681713002: Update from chromium https://crrev.com/301315 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/socket/ssl_client_socket_nss.cc ('k') | net/spdy/spdy_framer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_framer.h
diff --git a/net/spdy/spdy_framer.h b/net/spdy/spdy_framer.h
index 99db36a417433fdf0406ff758308c073afa52638..29cab72e7c7b38b894f23b5ff2b8665918d06dd5 100644
--- a/net/spdy/spdy_framer.h
+++ b/net/spdy/spdy_framer.h
@@ -709,36 +709,18 @@ class NET_EXPORT_PRIVATE SpdyFramer {
// Set the error code and moves the framer into the error state.
void set_error(SpdyError error);
- // The maximum size of the control frames that we support.
- // This limit is arbitrary. We can enforce it here or at the application
- // layer. We chose the framing layer, but this can be changed (or removed)
- // if necessary later down the line.
- size_t GetControlFrameBufferMaxSize() const {
- // The theoretical maximum for SPDY3 and earlier is (2^24 - 1) +
- // 8, since the length field does not count the size of the
- // header.
- if (spdy_version_ == SPDY2) {
- return 64 * 1024;
- }
- if (spdy_version_ == SPDY3) {
- return 16 * 1024 * 1024;
- }
- // Absolute maximum size of HTTP2 frame payload (section 4.2 "Frame size").
- return (1<<14) - 1;
- }
-
- // TODO(jgraettinger): For h2-13 interop testing coverage,
- // fragment at smaller payload boundaries.
- size_t GetHeaderFragmentMaxSize() const {
- return GetControlFrameBufferMaxSize() >> 4; // 1023 bytes.
- }
-
// The size of the control frame buffer.
// Since this is only used for control frame headers, the maximum control
// frame header size (SYN_STREAM) is sufficient; all remaining control
// frame data is streamed to the visitor.
static const size_t kControlFrameBufferSize;
+ // The maximum size of the control frames that we support.
+ // This limit is arbitrary. We can enforce it here or at the application
+ // layer. We chose the framing layer, but this can be changed (or removed)
+ // if necessary later down the line.
+ static const size_t kMaxControlFrameSize;
+
SpdyState state_;
SpdyState previous_state_;
SpdyError error_code_;
« no previous file with comments | « net/socket/ssl_client_socket_nss.cc ('k') | net/spdy/spdy_framer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698