| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 } | 86 } |
| 87 } | 87 } |
| 88 | 88 |
| 89 session->http_stream_factory()->ProcessAlternateProtocol( | 89 session->http_stream_factory()->ProcessAlternateProtocol( |
| 90 session->http_server_properties(), | 90 session->http_server_properties(), |
| 91 alternate_protocol_values, | 91 alternate_protocol_values, |
| 92 http_host_port_pair, | 92 http_host_port_pair, |
| 93 *session); | 93 *session); |
| 94 } | 94 } |
| 95 | 95 |
| 96 base::Value* NetLogSSLVersionFallbackCallback( | 96 scoped_ptr<base::Value> NetLogSSLVersionFallbackCallback( |
| 97 const GURL* url, | 97 const GURL* url, |
| 98 int net_error, | 98 int net_error, |
| 99 SSLFailureState ssl_failure_state, | 99 SSLFailureState ssl_failure_state, |
| 100 uint16 version_before, | 100 uint16 version_before, |
| 101 uint16 version_after, | 101 uint16 version_after, |
| 102 NetLogCaptureMode /* capture_mode */) { | 102 NetLogCaptureMode /* capture_mode */) { |
| 103 base::DictionaryValue* dict = new base::DictionaryValue(); | 103 scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); |
| 104 dict->SetString("host_and_port", GetHostAndPort(*url)); | 104 dict->SetString("host_and_port", GetHostAndPort(*url)); |
| 105 dict->SetInteger("net_error", net_error); | 105 dict->SetInteger("net_error", net_error); |
| 106 dict->SetInteger("ssl_failure_state", ssl_failure_state); | 106 dict->SetInteger("ssl_failure_state", ssl_failure_state); |
| 107 dict->SetInteger("version_before", version_before); | 107 dict->SetInteger("version_before", version_before); |
| 108 dict->SetInteger("version_after", version_after); | 108 dict->SetInteger("version_after", version_after); |
| 109 return dict; | 109 return dict.Pass(); |
| 110 } | 110 } |
| 111 | 111 |
| 112 base::Value* NetLogSSLCipherFallbackCallback( | 112 scoped_ptr<base::Value> NetLogSSLCipherFallbackCallback( |
| 113 const GURL* url, | 113 const GURL* url, |
| 114 int net_error, | 114 int net_error, |
| 115 NetLogCaptureMode /* capture_mode */) { | 115 NetLogCaptureMode /* capture_mode */) { |
| 116 base::DictionaryValue* dict = new base::DictionaryValue(); | 116 scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); |
| 117 dict->SetString("host_and_port", GetHostAndPort(*url)); | 117 dict->SetString("host_and_port", GetHostAndPort(*url)); |
| 118 dict->SetInteger("net_error", net_error); | 118 dict->SetInteger("net_error", net_error); |
| 119 return dict; | 119 return dict.Pass(); |
| 120 } | 120 } |
| 121 | 121 |
| 122 } // namespace | 122 } // namespace |
| 123 | 123 |
| 124 //----------------------------------------------------------------------------- | 124 //----------------------------------------------------------------------------- |
| 125 | 125 |
| 126 HttpNetworkTransaction::HttpNetworkTransaction(RequestPriority priority, | 126 HttpNetworkTransaction::HttpNetworkTransaction(RequestPriority priority, |
| 127 HttpNetworkSession* session) | 127 HttpNetworkSession* session) |
| 128 : pending_auth_target_(HttpAuth::AUTH_NONE), | 128 : pending_auth_target_(HttpAuth::AUTH_NONE), |
| 129 io_callback_(base::Bind(&HttpNetworkTransaction::OnIOComplete, | 129 io_callback_(base::Bind(&HttpNetworkTransaction::OnIOComplete, |
| (...skipping 1523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1653 DCHECK(stream_request_); | 1653 DCHECK(stream_request_); |
| 1654 | 1654 |
| 1655 // Since the transaction can restart with auth credentials, it may create a | 1655 // Since the transaction can restart with auth credentials, it may create a |
| 1656 // stream more than once. Accumulate all of the connection attempts across | 1656 // stream more than once. Accumulate all of the connection attempts across |
| 1657 // those streams by appending them to the vector: | 1657 // those streams by appending them to the vector: |
| 1658 for (const auto& attempt : stream_request_->connection_attempts()) | 1658 for (const auto& attempt : stream_request_->connection_attempts()) |
| 1659 connection_attempts_.push_back(attempt); | 1659 connection_attempts_.push_back(attempt); |
| 1660 } | 1660 } |
| 1661 | 1661 |
| 1662 } // namespace net | 1662 } // namespace net |
| OLD | NEW |