| 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_network_transaction.h" | 5 #include "net/http/http_network_transaction.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 fallback_error_code_(ERR_SSL_INAPPROPRIATE_FALLBACK), | 147 fallback_error_code_(ERR_SSL_INAPPROPRIATE_FALLBACK), |
| 148 fallback_failure_state_(SSL_FAILURE_NONE), | 148 fallback_failure_state_(SSL_FAILURE_NONE), |
| 149 request_headers_(), | 149 request_headers_(), |
| 150 read_buf_len_(0), | 150 read_buf_len_(0), |
| 151 total_received_bytes_(0), | 151 total_received_bytes_(0), |
| 152 total_sent_bytes_(0), | 152 total_sent_bytes_(0), |
| 153 next_state_(STATE_NONE), | 153 next_state_(STATE_NONE), |
| 154 establishing_tunnel_(false), | 154 establishing_tunnel_(false), |
| 155 websocket_handshake_stream_base_create_helper_(NULL) { | 155 websocket_handshake_stream_base_create_helper_(NULL) { |
| 156 session->ssl_config_service()->GetSSLConfig(&server_ssl_config_); | 156 session->ssl_config_service()->GetSSLConfig(&server_ssl_config_); |
| 157 session->GetNextProtos(&server_ssl_config_.next_protos); | 157 session->GetAlpnProtos(&server_ssl_config_.alpn_protos); |
| 158 session->GetNpnProtos(&server_ssl_config_.npn_protos); |
| 158 proxy_ssl_config_ = server_ssl_config_; | 159 proxy_ssl_config_ = server_ssl_config_; |
| 159 } | 160 } |
| 160 | 161 |
| 161 HttpNetworkTransaction::~HttpNetworkTransaction() { | 162 HttpNetworkTransaction::~HttpNetworkTransaction() { |
| 162 if (stream_.get()) { | 163 if (stream_.get()) { |
| 163 // TODO(mbelshe): The stream_ should be able to compute whether or not the | 164 // TODO(mbelshe): The stream_ should be able to compute whether or not the |
| 164 // stream should be kept alive. No reason to compute here | 165 // stream should be kept alive. No reason to compute here |
| 165 // and pass it in. | 166 // and pass it in. |
| 166 if (!stream_->CanReuseConnection() || next_state_ != STATE_NONE) { | 167 if (!stream_->CanReuseConnection() || next_state_ != STATE_NONE) { |
| 167 stream_->Close(true /* not reusable */); | 168 stream_->Close(true /* not reusable */); |
| (...skipping 1504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1672 DCHECK(stream_request_); | 1673 DCHECK(stream_request_); |
| 1673 | 1674 |
| 1674 // Since the transaction can restart with auth credentials, it may create a | 1675 // Since the transaction can restart with auth credentials, it may create a |
| 1675 // stream more than once. Accumulate all of the connection attempts across | 1676 // stream more than once. Accumulate all of the connection attempts across |
| 1676 // those streams by appending them to the vector: | 1677 // those streams by appending them to the vector: |
| 1677 for (const auto& attempt : stream_request_->connection_attempts()) | 1678 for (const auto& attempt : stream_request_->connection_attempts()) |
| 1678 connection_attempts_.push_back(attempt); | 1679 connection_attempts_.push_back(attempt); |
| 1679 } | 1680 } |
| 1680 | 1681 |
| 1681 } // namespace net | 1682 } // namespace net |
| OLD | NEW |