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

Unified Diff: net/spdy/spdy_http_stream.cc

Issue 1914663002: Increase read buffer size for SPDY upload (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: net/spdy/spdy_http_stream.cc
diff --git a/net/spdy/spdy_http_stream.cc b/net/spdy/spdy_http_stream.cc
index 2bdd4990ec0cac697cddb73d7fde633961fece5c..c9cf79544982d3cd8a530adbb82ea27ecc80956a 100644
--- a/net/spdy/spdy_http_stream.cc
+++ b/net/spdy/spdy_http_stream.cc
@@ -29,6 +29,8 @@
namespace net {
+const size_t SpdyHttpStream::kRequestBodyBufferSize = 1 << 14; // 16KB
+
SpdyHttpStream::SpdyHttpStream(const base::WeakPtr<SpdySession>& spdy_session,
bool direct)
: spdy_session_(spdy_session),
@@ -232,9 +234,7 @@ int SpdyHttpStream::SendRequest(const HttpRequestHeaders& request_headers,
CHECK(!request_body_buf_.get());
if (HasUploadData()) {
- // Use kMaxSpdyFrameChunkSize as the buffer size, since the request
- // body data is written with this size at a time.
- request_body_buf_ = new IOBufferWithSize(kMaxSpdyFrameChunkSize);
+ request_body_buf_ = new IOBufferWithSize(kRequestBodyBufferSize);
// The request body buffer is empty at first.
request_body_buf_size_ = 0;
}

Powered by Google App Engine
This is Rietveld 408576698