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

Side by Side Diff: net/spdy/spdy_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, 4 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_transaction.cc ('k') | no next file » | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/spdy/spdy_network_transaction.h" 5 #include "net/spdy/spdy_network_transaction.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
10 #include "base/stats_counters.h" 10 #include "base/stats_counters.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 214
215 return rv; 215 return rv;
216 } 216 }
217 217
218 int SpdyNetworkTransaction::DoInitConnection() { 218 int SpdyNetworkTransaction::DoInitConnection() {
219 next_state_ = STATE_INIT_CONNECTION_COMPLETE; 219 next_state_ = STATE_INIT_CONNECTION_COMPLETE;
220 220
221 std::string host = request_->url.HostNoBrackets(); 221 std::string host = request_->url.HostNoBrackets();
222 int port = request_->url.EffectiveIntPort(); 222 int port = request_->url.EffectiveIntPort();
223 223
224 // Use the fixed testing ports if they've been provided. This is useful for
225 // debugging.
226 if (SpdySession::SSLMode()) {
227 if (session_->fixed_https_port() != 0)
228 port = session_->fixed_https_port();
229 } else if (session_->fixed_http_port() != 0) {
230 port = session_->fixed_http_port();
231 }
232
233 std::string connection_group = "spdy."; 224 std::string connection_group = "spdy.";
234 HostPortPair host_port_pair(host, port); 225 HostPortPair host_port_pair(host, port);
235 connection_group.append(host_port_pair.ToString()); 226 connection_group.append(host_port_pair.ToString());
236 scoped_refptr<TCPSocketParams> tcp_params = 227 scoped_refptr<TCPSocketParams> tcp_params =
237 new TCPSocketParams(host_port_pair, request_->priority, 228 new TCPSocketParams(host_port_pair, request_->priority,
238 request_->referrer, false); 229 request_->referrer, false);
239 230
240 spdy_ = session_->spdy_session_pool()->Get( 231 spdy_ = session_->spdy_session_pool()->Get(
241 host_port_pair, session_, net_log_); 232 host_port_pair, session_, net_log_);
242 DCHECK(spdy_); 233 DCHECK(spdy_);
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 user_buffer_ = NULL; 316 user_buffer_ = NULL;
326 user_buffer_len_ = 0; 317 user_buffer_len_ = 0;
327 318
328 if (result <= 0) 319 if (result <= 0)
329 stream_.reset(); 320 stream_.reset();
330 321
331 return result; 322 return result;
332 } 323 }
333 324
334 } // namespace net 325 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_transaction.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698