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 1590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1601 | 1601 |
1602 int load_flags = request_info_.load_flags; | 1602 int load_flags = request_info_.load_flags; |
1603 if (session_->params().ignore_certificate_errors) | 1603 if (session_->params().ignore_certificate_errors) |
1604 load_flags |= LOAD_IGNORE_ALL_CERT_ERRORS; | 1604 load_flags |= LOAD_IGNORE_ALL_CERT_ERRORS; |
1605 if (ssl_socket->IgnoreCertError(error, load_flags)) | 1605 if (ssl_socket->IgnoreCertError(error, load_flags)) |
1606 return OK; | 1606 return OK; |
1607 return error; | 1607 return error; |
1608 } | 1608 } |
1609 | 1609 |
1610 void HttpStreamFactoryImpl::Job::SwitchToSpdyMode() { | 1610 void HttpStreamFactoryImpl::Job::SwitchToSpdyMode() { |
1611 if (HttpStreamFactory::spdy_enabled()) | 1611 using_spdy_ = true; |
mef
2016/07/13 18:26:32
Does using_spdy_ mean using_h2 now?
Bence
2016/07/15 20:35:33
Yes, it does. Usually "spdy" in the codebase mean
| |
1612 using_spdy_ = true; | |
1613 } | 1612 } |
1614 | 1613 |
1615 void HttpStreamFactoryImpl::Job::ReportJobSucceededForRequest() { | 1614 void HttpStreamFactoryImpl::Job::ReportJobSucceededForRequest() { |
1616 if (using_existing_quic_session_) { | 1615 if (using_existing_quic_session_) { |
1617 // If an existing session was used, then no TCP connection was | 1616 // If an existing session was used, then no TCP connection was |
1618 // started. | 1617 // started. |
1619 HistogramAlternateProtocolUsage(ALTERNATE_PROTOCOL_USAGE_NO_RACE); | 1618 HistogramAlternateProtocolUsage(ALTERNATE_PROTOCOL_USAGE_NO_RACE); |
1620 } else if (IsSpdyAlternative() || IsQuicAlternative()) { | 1619 } else if (IsSpdyAlternative() || IsQuicAlternative()) { |
1621 // This Job was the alternative Job, and hence won the race. | 1620 // This Job was the alternative Job, and hence won the race. |
1622 HistogramAlternateProtocolUsage(ALTERNATE_PROTOCOL_USAGE_WON_RACE); | 1621 HistogramAlternateProtocolUsage(ALTERNATE_PROTOCOL_USAGE_WON_RACE); |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1727 | 1726 |
1728 ConnectionAttempts socket_attempts = connection_->connection_attempts(); | 1727 ConnectionAttempts socket_attempts = connection_->connection_attempts(); |
1729 if (connection_->socket()) { | 1728 if (connection_->socket()) { |
1730 connection_->socket()->GetConnectionAttempts(&socket_attempts); | 1729 connection_->socket()->GetConnectionAttempts(&socket_attempts); |
1731 } | 1730 } |
1732 | 1731 |
1733 delegate_->AddConnectionAttemptsToRequest(this, socket_attempts); | 1732 delegate_->AddConnectionAttemptsToRequest(this, socket_attempts); |
1734 } | 1733 } |
1735 | 1734 |
1736 } // namespace net | 1735 } // namespace net |
OLD | NEW |