| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 return dict; | 111 return dict; |
| 112 } | 112 } |
| 113 | 113 |
| 114 } // namespace | 114 } // namespace |
| 115 | 115 |
| 116 //----------------------------------------------------------------------------- | 116 //----------------------------------------------------------------------------- |
| 117 | 117 |
| 118 HttpNetworkTransaction::HttpNetworkTransaction(RequestPriority priority, | 118 HttpNetworkTransaction::HttpNetworkTransaction(RequestPriority priority, |
| 119 HttpNetworkSession* session) | 119 HttpNetworkSession* session) |
| 120 : pending_auth_target_(HttpAuth::AUTH_NONE), | 120 : pending_auth_target_(HttpAuth::AUTH_NONE), |
| 121 io_callback_(base::Bind(&HttpNetworkTransaction::OnIOComplete, | |
| 122 base::Unretained(this))), | |
| 123 session_(session), | 121 session_(session), |
| 124 request_(NULL), | 122 request_(NULL), |
| 125 priority_(priority), | 123 priority_(priority), |
| 126 headers_valid_(false), | 124 headers_valid_(false), |
| 127 logged_response_time_(false), | 125 logged_response_time_(false), |
| 128 request_headers_(), | 126 request_headers_(), |
| 129 read_buf_len_(0), | 127 read_buf_len_(0), |
| 130 next_state_(STATE_NONE), | 128 next_state_(STATE_NONE), |
| 131 establishing_tunnel_(false) { | 129 establishing_tunnel_(false), |
| 130 weak_ptr_factory_(this) { |
| 131 io_callback_ = base::Bind(&HttpNetworkTransaction::OnIOComplete, |
| 132 weak_ptr_factory_.GetWeakPtr()); |
| 133 |
| 132 session->ssl_config_service()->GetSSLConfig(&server_ssl_config_); | 134 session->ssl_config_service()->GetSSLConfig(&server_ssl_config_); |
| 133 if (session->http_stream_factory()->has_next_protos()) { | 135 if (session->http_stream_factory()->has_next_protos()) { |
| 134 server_ssl_config_.next_protos = | 136 server_ssl_config_.next_protos = |
| 135 session->http_stream_factory()->next_protos(); | 137 session->http_stream_factory()->next_protos(); |
| 136 } | 138 } |
| 137 proxy_ssl_config_ = server_ssl_config_; | 139 proxy_ssl_config_ = server_ssl_config_; |
| 138 } | 140 } |
| 139 | 141 |
| 140 HttpNetworkTransaction::~HttpNetworkTransaction() { | 142 HttpNetworkTransaction::~HttpNetworkTransaction() { |
| 141 if (stream_.get()) { | 143 if (stream_.get()) { |
| (...skipping 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1479 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, | 1481 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, |
| 1480 state); | 1482 state); |
| 1481 break; | 1483 break; |
| 1482 } | 1484 } |
| 1483 return description; | 1485 return description; |
| 1484 } | 1486 } |
| 1485 | 1487 |
| 1486 #undef STATE_CASE | 1488 #undef STATE_CASE |
| 1487 | 1489 |
| 1488 } // namespace net | 1490 } // namespace net |
| OLD | NEW |