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

Unified Diff: net/tools/quic/quic_spdy_client_stream.cc

Issue 105103007: Minor cleanup of QuicSpdyServerStream and QuicSpdyClientStream. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/tools/quic/quic_spdy_client_stream.h ('k') | net/tools/quic/quic_spdy_server_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_spdy_client_stream.cc
diff --git a/net/tools/quic/quic_spdy_client_stream.cc b/net/tools/quic/quic_spdy_client_stream.cc
index 2133e4688e1710b7499f9aad1379bb10a70dfdc7..1956c7940db42866117614d2bd0d096d747c3306 100644
--- a/net/tools/quic/quic_spdy_client_stream.cc
+++ b/net/tools/quic/quic_spdy_client_stream.cc
@@ -70,14 +70,12 @@ ssize_t QuicSpdyClientStream::SendRequest(const BalsaHeaders& headers,
SpdyHeaderBlock header_block =
SpdyUtils::RequestHeadersToSpdyHeaders(headers);
+ bool send_fin_with_headers = fin && body.empty();
string headers_string = session()->compressor()->CompressHeadersWithPriority(
priority(), header_block);
+ WriteOrBufferData(headers_string, send_fin_with_headers);
- bool has_body = !body.empty();
-
- WriteOrBufferData(headers_string, fin && !has_body); // last_data
-
- if (has_body) {
+ if (!body.empty()) {
WriteOrBufferData(body, fin);
}
« no previous file with comments | « net/tools/quic/quic_spdy_client_stream.h ('k') | net/tools/quic/quic_spdy_server_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698