| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 user_read_buf_(NULL), | 56 user_read_buf_(NULL), |
| 57 user_read_buf_len_(0), | 57 user_read_buf_len_(0), |
| 58 user_callback_(NULL), | 58 user_callback_(NULL), |
| 59 connection_(connection), | 59 connection_(connection), |
| 60 net_log_(net_log), | 60 net_log_(net_log), |
| 61 ALLOW_THIS_IN_INITIALIZER_LIST( | 61 ALLOW_THIS_IN_INITIALIZER_LIST( |
| 62 io_callback_(this, &HttpStreamParser::OnIOComplete)), | 62 io_callback_(this, &HttpStreamParser::OnIOComplete)), |
| 63 chunk_length_(0), | 63 chunk_length_(0), |
| 64 chunk_length_without_encoding_(0), | 64 chunk_length_without_encoding_(0), |
| 65 sent_last_chunk_(false) { | 65 sent_last_chunk_(false) { |
| 66 DCHECK_EQ(0, read_buffer->offset()); | |
| 67 } | 66 } |
| 68 | 67 |
| 69 HttpStreamParser::~HttpStreamParser() { | 68 HttpStreamParser::~HttpStreamParser() { |
| 70 if (request_body_ != NULL && request_body_->is_chunked()) | 69 if (request_body_ != NULL && request_body_->is_chunked()) |
| 71 request_body_->set_chunk_callback(NULL); | 70 request_body_->set_chunk_callback(NULL); |
| 72 } | 71 } |
| 73 | 72 |
| 74 int HttpStreamParser::SendRequest(const std::string& request_line, | 73 int HttpStreamParser::SendRequest(const std::string& request_line, |
| 75 const HttpRequestHeaders& headers, | 74 const HttpRequestHeaders& headers, |
| 76 UploadDataStream* request_body, | 75 UploadDataStream* request_body, |
| (...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 741 void HttpStreamParser::GetSSLCertRequestInfo( | 740 void HttpStreamParser::GetSSLCertRequestInfo( |
| 742 SSLCertRequestInfo* cert_request_info) { | 741 SSLCertRequestInfo* cert_request_info) { |
| 743 if (request_->url.SchemeIs("https") && connection_->socket()) { | 742 if (request_->url.SchemeIs("https") && connection_->socket()) { |
| 744 SSLClientSocket* ssl_socket = | 743 SSLClientSocket* ssl_socket = |
| 745 static_cast<SSLClientSocket*>(connection_->socket()); | 744 static_cast<SSLClientSocket*>(connection_->socket()); |
| 746 ssl_socket->GetSSLCertRequestInfo(cert_request_info); | 745 ssl_socket->GetSSLCertRequestInfo(cert_request_info); |
| 747 } | 746 } |
| 748 } | 747 } |
| 749 | 748 |
| 750 } // namespace net | 749 } // namespace net |
| OLD | NEW |