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

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

Issue 3041019: Remove --testing-fixed-http-port and --testing-fixed-https-port. (Closed)
Patch Set: Remove use of --testing-fixed-http-port and --testing-fixed-https-port Created 10 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_network_session.cc ('k') | net/spdy/spdy_network_transaction.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 } 726 }
727 727
728 bool want_spdy_over_npn = alternate_protocol_mode_ == kUsingAlternateProtocol 728 bool want_spdy_over_npn = alternate_protocol_mode_ == kUsingAlternateProtocol
729 && alternate_protocol_ == HttpAlternateProtocols::NPN_SPDY_1; 729 && alternate_protocol_ == HttpAlternateProtocols::NPN_SPDY_1;
730 using_ssl_ = request_->url.SchemeIs("https") || 730 using_ssl_ = request_->url.SchemeIs("https") ||
731 (want_spdy_without_npn_ && want_ssl_over_spdy_without_npn_) || 731 (want_spdy_without_npn_ && want_ssl_over_spdy_without_npn_) ||
732 want_spdy_over_npn; 732 want_spdy_over_npn;
733 using_spdy_ = false; 733 using_spdy_ = false;
734 response_.was_fetched_via_proxy = !proxy_info_.is_direct(); 734 response_.was_fetched_via_proxy = !proxy_info_.is_direct();
735 735
736 // Use the fixed testing ports if they've been provided.
737 if (using_ssl_) {
738 if (session_->fixed_https_port() != 0)
739 endpoint_.set_port(session_->fixed_https_port());
740 } else if (session_->fixed_http_port() != 0) {
741 endpoint_.set_port(session_->fixed_http_port());
742 }
743
744 // Check first if we have a spdy session for this group. If so, then go 736 // Check first if we have a spdy session for this group. If so, then go
745 // straight to using that. 737 // straight to using that.
746 if (session_->spdy_session_pool()->HasSession(endpoint_)) { 738 if (session_->spdy_session_pool()->HasSession(endpoint_)) {
747 using_spdy_ = true; 739 using_spdy_ = true;
748 reused_socket_ = true; 740 reused_socket_ = true;
749 next_state_ = STATE_SPDY_GET_STREAM; 741 next_state_ = STATE_SPDY_GET_STREAM;
750 return OK; 742 return OK;
751 } 743 }
752 744
753 // Build the string used to uniquely identify connections of this type. 745 // Build the string used to uniquely identify connections of this type.
(...skipping 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after
1830 default: 1822 default:
1831 description = StringPrintf("Unknown state 0x%08X (%u)", state, state); 1823 description = StringPrintf("Unknown state 0x%08X (%u)", state, state);
1832 break; 1824 break;
1833 } 1825 }
1834 return description; 1826 return description;
1835 } 1827 }
1836 1828
1837 #undef STATE_CASE 1829 #undef STATE_CASE
1838 1830
1839 } // namespace net 1831 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_session.cc ('k') | net/spdy/spdy_network_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698