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

Side by Side Diff: net/tools/quic/quic_spdy_client_stream.cc

Issue 14816006: Land Recent QUIC changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added missing NET_PRIVATE_EXPORT to QuicWallTime Created 7 years, 7 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/tools/quic/quic_server.cc ('k') | net/tools/quic/quic_spdy_server_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 #include "net/tools/quic/quic_spdy_client_stream.h" 5 #include "net/tools/quic/quic_spdy_client_stream.h"
6 6
7 #include "net/spdy/spdy_framer.h" 7 #include "net/spdy/spdy_framer.h"
8 #include "net/tools/quic/quic_client_session.h" 8 #include "net/tools/quic/quic_client_session.h"
9 #include "net/tools/quic/spdy_utils.h" 9 #include "net/tools/quic/spdy_utils.h"
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 StringPiece body, 60 StringPiece body,
61 bool fin) { 61 bool fin) {
62 SpdyHeaderBlock header_block = 62 SpdyHeaderBlock header_block =
63 SpdyUtils::RequestHeadersToSpdyHeaders(headers); 63 SpdyUtils::RequestHeadersToSpdyHeaders(headers);
64 64
65 string headers_string = 65 string headers_string =
66 session()->compressor()->CompressHeaders(header_block); 66 session()->compressor()->CompressHeaders(header_block);
67 67
68 bool has_body = !body.empty(); 68 bool has_body = !body.empty();
69 69
70 WriteData(headers_string, fin && !has_body); 70 WriteData(headers_string, fin && !has_body); // last_data
71 71
72 if (has_body) { 72 if (has_body) {
73 WriteData(body, fin); 73 WriteData(body, fin);
74 } 74 }
75 75
76 return headers_string.size() + body.size(); 76 return headers_string.size() + body.size();
77 } 77 }
78 78
79 int QuicSpdyClientStream::ParseResponseHeaders() { 79 int QuicSpdyClientStream::ParseResponseHeaders() {
80 size_t read_buf_len = static_cast<size_t>(read_buf_->offset()); 80 size_t read_buf_len = static_cast<size_t>(read_buf_->offset());
(...skipping 14 matching lines...) Expand all
95 size_t delta = read_buf_len - len; 95 size_t delta = read_buf_len - len;
96 if (delta > 0) { 96 if (delta > 0) {
97 mutable_data()->append(data + len, delta); 97 mutable_data()->append(data + len, delta);
98 } 98 }
99 99
100 return len; 100 return len;
101 } 101 }
102 102
103 } // namespace tools 103 } // namespace tools
104 } // namespace net 104 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_server.cc ('k') | net/tools/quic/quic_spdy_server_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698