OLD | NEW |
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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
11 #include "base/strings/string_number_conversions.h" | |
12 #include "net/quic/core/quic_alarm.h" | 11 #include "net/quic/core/quic_alarm.h" |
13 #include "net/quic/core/quic_client_promised_info.h" | 12 #include "net/quic/core/quic_client_promised_info.h" |
14 #include "net/quic/core/spdy_utils.h" | 13 #include "net/quic/core/spdy_utils.h" |
15 #include "net/spdy/spdy_protocol.h" | 14 #include "net/spdy/spdy_protocol.h" |
16 #include "net/tools/quic/quic_client_session.h" | 15 #include "net/tools/quic/quic_client_session.h" |
17 | 16 |
18 using base::StringPiece; | 17 using base::StringPiece; |
19 using std::string; | 18 using std::string; |
20 using base::StringToInt; | |
21 | 19 |
22 namespace net { | 20 namespace net { |
23 | 21 |
24 QuicSpdyClientStream::QuicSpdyClientStream(QuicStreamId id, | 22 QuicSpdyClientStream::QuicSpdyClientStream(QuicStreamId id, |
25 QuicClientSession* session) | 23 QuicClientSession* session) |
26 : QuicSpdyStream(id, session), | 24 : QuicSpdyStream(id, session), |
27 content_length_(-1), | 25 content_length_(-1), |
28 response_code_(0), | 26 response_code_(0), |
29 header_bytes_read_(0), | 27 header_bytes_read_(0), |
30 header_bytes_written_(0), | 28 header_bytes_written_(0), |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 bytes_sent += header_bytes_written_; | 150 bytes_sent += header_bytes_written_; |
153 | 151 |
154 if (!body.empty()) { | 152 if (!body.empty()) { |
155 WriteOrBufferData(body, fin, nullptr); | 153 WriteOrBufferData(body, fin, nullptr); |
156 } | 154 } |
157 | 155 |
158 return bytes_sent; | 156 return bytes_sent; |
159 } | 157 } |
160 | 158 |
161 } // namespace net | 159 } // namespace net |
OLD | NEW |