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

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

Issue 2318053004: Remove obsolete QUIC disabling code. (Closed)
Patch Set: Rebase Created 4 years, 3 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_network_session.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 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 replacements.SetHostStr(destination.host()); 858 replacements.SetHostStr(destination.host());
859 const std::string new_port = base::UintToString(destination.port()); 859 const std::string new_port = base::UintToString(destination.port());
860 replacements.SetPortStr(new_port); 860 replacements.SetPortStr(new_port);
861 replacements.ClearUsername(); 861 replacements.ClearUsername();
862 replacements.ClearPassword(); 862 replacements.ClearPassword();
863 replacements.ClearPath(); 863 replacements.ClearPath();
864 replacements.ClearQuery(); 864 replacements.ClearQuery();
865 replacements.ClearRef(); 865 replacements.ClearRef();
866 url = url.ReplaceComponents(replacements); 866 url = url.ReplaceComponents(replacements);
867 867
868 // If QUIC is disabled on the destination port, return error. 868 if (session_->quic_stream_factory()->IsQuicDisabled())
869 if (session_->quic_stream_factory()->IsQuicDisabled(destination.port()))
870 return ERR_QUIC_PROTOCOL_ERROR; 869 return ERR_QUIC_PROTOCOL_ERROR;
871 } else { 870 } else {
872 DCHECK(using_ssl_); 871 DCHECK(using_ssl_);
873 // The certificate of a QUIC alternative server is expected to be valid 872 // The certificate of a QUIC alternative server is expected to be valid
874 // for the origin of the request (in addition to being valid for the 873 // for the origin of the request (in addition to being valid for the
875 // server itself). 874 // server itself).
876 destination = destination_; 875 destination = destination_;
877 ssl_config = &server_ssl_config_; 876 ssl_config = &server_ssl_config_;
878 } 877 }
879 int rv = 878 int rv =
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 using_spdy_ = true; 987 using_spdy_ = true;
989 next_state_ = STATE_CREATE_STREAM; 988 next_state_ = STATE_CREATE_STREAM;
990 } else { 989 } else {
991 // It is possible that the spdy session no longer exists. 990 // It is possible that the spdy session no longer exists.
992 ReturnToStateInitConnection(true /* close connection */); 991 ReturnToStateInitConnection(true /* close connection */);
993 } 992 }
994 return OK; 993 return OK;
995 } 994 }
996 995
997 if (proxy_info_.is_quic() && using_quic_) { 996 if (proxy_info_.is_quic() && using_quic_) {
998 // Mark QUIC proxy as bad if QUIC got disabled on the destination port. 997 // Mark QUIC proxy as bad if QUIC got disabled.
999 // Underlying QUIC layer would have closed the connection. 998 // Underlying QUIC layer would have closed the connection.
1000 HostPortPair destination = proxy_info_.proxy_server().host_port_pair(); 999 HostPortPair destination = proxy_info_.proxy_server().host_port_pair();
1001 if (session_->quic_stream_factory()->IsQuicDisabled(destination.port())) { 1000 if (session_->quic_stream_factory()->IsQuicDisabled()) {
1002 using_quic_ = false; 1001 using_quic_ = false;
1003 return ReconsiderProxyAfterError(ERR_QUIC_PROTOCOL_ERROR); 1002 return ReconsiderProxyAfterError(ERR_QUIC_PROTOCOL_ERROR);
1004 } 1003 }
1005 } 1004 }
1006 1005
1007 // |result| may be the result of any of the stacked pools. The following 1006 // |result| may be the result of any of the stacked pools. The following
1008 // logic is used when determining how to interpret an error. 1007 // logic is used when determining how to interpret an error.
1009 // If |result| < 0: 1008 // If |result| < 0:
1010 // and connection_->socket() != NULL, then the SSL handshake ran and it 1009 // and connection_->socket() != NULL, then the SSL handshake ran and it
1011 // is a potentially recoverable error. 1010 // is a potentially recoverable error.
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
1631 1630
1632 ConnectionAttempts socket_attempts = connection_->connection_attempts(); 1631 ConnectionAttempts socket_attempts = connection_->connection_attempts();
1633 if (connection_->socket()) { 1632 if (connection_->socket()) {
1634 connection_->socket()->GetConnectionAttempts(&socket_attempts); 1633 connection_->socket()->GetConnectionAttempts(&socket_attempts);
1635 } 1634 }
1636 1635
1637 delegate_->AddConnectionAttemptsToRequest(this, socket_attempts); 1636 delegate_->AddConnectionAttemptsToRequest(this, socket_attempts);
1638 } 1637 }
1639 1638
1640 } // namespace net 1639 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_session.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