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/http/http_stream_parser.h" | 5 #include "net/http/http_stream_parser.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 int size_; | 197 int size_; |
198 int used_; | 198 int used_; |
199 }; | 199 }; |
200 | 200 |
201 // 2 CRLFs + max of 8 hex chars. | 201 // 2 CRLFs + max of 8 hex chars. |
202 const size_t HttpStreamParser::kChunkHeaderFooterSize = 12; | 202 const size_t HttpStreamParser::kChunkHeaderFooterSize = 12; |
203 | 203 |
204 HttpStreamParser::HttpStreamParser(ClientSocketHandle* connection, | 204 HttpStreamParser::HttpStreamParser(ClientSocketHandle* connection, |
205 const HttpRequestInfo* request, | 205 const HttpRequestInfo* request, |
206 GrowableIOBuffer* read_buffer, | 206 GrowableIOBuffer* read_buffer, |
207 const BoundNetLog& net_log) | 207 const NetLogWithSource& net_log) |
208 : io_state_(STATE_NONE), | 208 : io_state_(STATE_NONE), |
209 request_(request), | 209 request_(request), |
210 request_headers_(nullptr), | 210 request_headers_(nullptr), |
211 request_headers_length_(0), | 211 request_headers_length_(0), |
212 http_09_on_non_default_ports_enabled_(false), | 212 http_09_on_non_default_ports_enabled_(false), |
213 read_buf_(read_buffer), | 213 read_buf_(read_buffer), |
214 read_buf_unused_offset_(0), | 214 read_buf_unused_offset_(0), |
215 response_header_start_offset_(-1), | 215 response_header_start_offset_(-1), |
216 received_bytes_(0), | 216 received_bytes_(0), |
217 sent_bytes_(0), | 217 sent_bytes_(0), |
(...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1222 UMA_HISTOGRAM_ENUMERATION("Net.HttpStatusLineStatus", status, | 1222 UMA_HISTOGRAM_ENUMERATION("Net.HttpStatusLineStatus", status, |
1223 HttpStatusLineValidator::STATUS_LINE_MAX); | 1223 HttpStatusLineValidator::STATUS_LINE_MAX); |
1224 } | 1224 } |
1225 | 1225 |
1226 bool HttpStreamParser::SendRequestBuffersEmpty() { | 1226 bool HttpStreamParser::SendRequestBuffersEmpty() { |
1227 return request_headers_ == nullptr && request_body_send_buf_ == nullptr && | 1227 return request_headers_ == nullptr && request_body_send_buf_ == nullptr && |
1228 request_body_send_buf_ == nullptr; | 1228 request_body_send_buf_ == nullptr; |
1229 } | 1229 } |
1230 | 1230 |
1231 } // namespace net | 1231 } // namespace net |
OLD | NEW |