Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(423)

Side by Side Diff: net/http/http_stream_factory_impl_job.cc

Issue 2140733002: Remove HttpStreamFactory::spdy_enabled_ static member and accessors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/http/http_stream_factory.cc ('k') | net/http/http_stream_factory_impl_job_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/http/http_stream_factory.cc ('k') | net/http/http_stream_factory_impl_job_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698