| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_basic_state.h" | 5 #include "net/http/http_basic_state.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "net/base/io_buffer.h" | 10 #include "net/base/io_buffer.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 connection_(std::move(connection)), | 24 connection_(std::move(connection)), |
| 25 using_proxy_(using_proxy), | 25 using_proxy_(using_proxy), |
| 26 http_09_on_non_default_ports_enabled_( | 26 http_09_on_non_default_ports_enabled_( |
| 27 http_09_on_non_default_ports_enabled), | 27 http_09_on_non_default_ports_enabled), |
| 28 request_info_(nullptr) {} | 28 request_info_(nullptr) {} |
| 29 | 29 |
| 30 HttpBasicState::~HttpBasicState() {} | 30 HttpBasicState::~HttpBasicState() {} |
| 31 | 31 |
| 32 int HttpBasicState::Initialize(const HttpRequestInfo* request_info, | 32 int HttpBasicState::Initialize(const HttpRequestInfo* request_info, |
| 33 RequestPriority priority, | 33 RequestPriority priority, |
| 34 const BoundNetLog& net_log, | 34 const NetLogWithSource& net_log, |
| 35 const CompletionCallback& callback) { | 35 const CompletionCallback& callback) { |
| 36 DCHECK(!parser_.get()); | 36 DCHECK(!parser_.get()); |
| 37 request_info_ = request_info; | 37 request_info_ = request_info; |
| 38 parser_.reset(new HttpStreamParser( | 38 parser_.reset(new HttpStreamParser( |
| 39 connection_.get(), request_info, read_buf_.get(), net_log)); | 39 connection_.get(), request_info, read_buf_.get(), net_log)); |
| 40 parser_->set_http_09_on_non_default_ports_enabled( | 40 parser_->set_http_09_on_non_default_ports_enabled( |
| 41 http_09_on_non_default_ports_enabled_); | 41 http_09_on_non_default_ports_enabled_); |
| 42 return OK; | 42 return OK; |
| 43 } | 43 } |
| 44 | 44 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 66 request_line.reserve(expected_size); | 66 request_line.reserve(expected_size); |
| 67 request_line.append(request_info_->method); | 67 request_line.append(request_info_->method); |
| 68 request_line.append(1, ' '); | 68 request_line.append(1, ' '); |
| 69 request_line.append(path); | 69 request_line.append(path); |
| 70 request_line.append(kSuffix, kSuffixLen); | 70 request_line.append(kSuffix, kSuffixLen); |
| 71 DCHECK_EQ(expected_size, request_line.size()); | 71 DCHECK_EQ(expected_size, request_line.size()); |
| 72 return request_line; | 72 return request_line; |
| 73 } | 73 } |
| 74 | 74 |
| 75 } // namespace net | 75 } // namespace net |
| OLD | NEW |