| 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_stream_factory_impl_job.h" | 5 #include "net/http/http_stream_factory_impl_job.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 1570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1581 | 1581 |
| 1582 int load_flags = request_info_.load_flags; | 1582 int load_flags = request_info_.load_flags; |
| 1583 if (session_->params().ignore_certificate_errors) | 1583 if (session_->params().ignore_certificate_errors) |
| 1584 load_flags |= LOAD_IGNORE_ALL_CERT_ERRORS; | 1584 load_flags |= LOAD_IGNORE_ALL_CERT_ERRORS; |
| 1585 if (ssl_socket->IgnoreCertError(error, load_flags)) | 1585 if (ssl_socket->IgnoreCertError(error, load_flags)) |
| 1586 return OK; | 1586 return OK; |
| 1587 return error; | 1587 return error; |
| 1588 } | 1588 } |
| 1589 | 1589 |
| 1590 void HttpStreamFactoryImpl::Job::SwitchToSpdyMode() { | 1590 void HttpStreamFactoryImpl::Job::SwitchToSpdyMode() { |
| 1591 if (protocol_negotiated_ == kProtoSPDY31 && | |
| 1592 !HttpStreamFactory::spdy_enabled()) | |
| 1593 return; | |
| 1594 | |
| 1595 using_spdy_ = true; | 1591 using_spdy_ = true; |
| 1596 } | 1592 } |
| 1597 | 1593 |
| 1598 void HttpStreamFactoryImpl::Job::ReportJobSucceededForRequest() { | 1594 void HttpStreamFactoryImpl::Job::ReportJobSucceededForRequest() { |
| 1599 if (using_existing_quic_session_) { | 1595 if (using_existing_quic_session_) { |
| 1600 // If an existing session was used, then no TCP connection was | 1596 // If an existing session was used, then no TCP connection was |
| 1601 // started. | 1597 // started. |
| 1602 HistogramAlternateProtocolUsage(ALTERNATE_PROTOCOL_USAGE_NO_RACE); | 1598 HistogramAlternateProtocolUsage(ALTERNATE_PROTOCOL_USAGE_NO_RACE); |
| 1603 } else if (IsSpdyAlternative() || IsQuicAlternative()) { | 1599 } else if (IsSpdyAlternative() || IsQuicAlternative()) { |
| 1604 // This Job was the alternative Job, and hence won the race. | 1600 // This Job was the alternative Job, and hence won the race. |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1664 | 1660 |
| 1665 ConnectionAttempts socket_attempts = connection_->connection_attempts(); | 1661 ConnectionAttempts socket_attempts = connection_->connection_attempts(); |
| 1666 if (connection_->socket()) { | 1662 if (connection_->socket()) { |
| 1667 connection_->socket()->GetConnectionAttempts(&socket_attempts); | 1663 connection_->socket()->GetConnectionAttempts(&socket_attempts); |
| 1668 } | 1664 } |
| 1669 | 1665 |
| 1670 delegate_->AddConnectionAttemptsToRequest(this, socket_attempts); | 1666 delegate_->AddConnectionAttemptsToRequest(this, socket_attempts); |
| 1671 } | 1667 } |
| 1672 | 1668 |
| 1673 } // namespace net | 1669 } // namespace net |
| OLD | NEW |