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

Side by Side Diff: net/quic/quic_stream_factory.cc

Issue 12326073: Remove the --use-spdy-over-quic command line option. Always use SPDY over QUIC. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_stream_factory.h ('k') | net/quic/quic_stream_factory_test.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/quic/quic_stream_factory.h" 5 #include "net/quic/quic_stream_factory.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/message_loop_proxy.h" 10 #include "base/message_loop_proxy.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 DCHECK(!factory_->HasActiveSession(host_port_proxy_pair_)); 213 DCHECK(!factory_->HasActiveSession(host_port_proxy_pair_));
214 factory_->ActivateSession(host_port_proxy_pair_, session_); 214 factory_->ActivateSession(host_port_proxy_pair_, session_);
215 215
216 return OK; 216 return OK;
217 } 217 }
218 218
219 QuicStreamFactory::QuicStreamFactory( 219 QuicStreamFactory::QuicStreamFactory(
220 HostResolver* host_resolver, 220 HostResolver* host_resolver,
221 ClientSocketFactory* client_socket_factory, 221 ClientSocketFactory* client_socket_factory,
222 QuicRandom* random_generator, 222 QuicRandom* random_generator,
223 QuicClock* clock, 223 QuicClock* clock)
224 bool use_spdy_over_quic)
225 : host_resolver_(host_resolver), 224 : host_resolver_(host_resolver),
226 client_socket_factory_(client_socket_factory), 225 client_socket_factory_(client_socket_factory),
227 random_generator_(random_generator), 226 random_generator_(random_generator),
228 clock_(clock), 227 clock_(clock),
229 use_spdy_over_quic_(use_spdy_over_quic),
230 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { 228 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
231 } 229 }
232 230
233 QuicStreamFactory::~QuicStreamFactory() { 231 QuicStreamFactory::~QuicStreamFactory() {
234 STLDeleteElements(&all_sessions_); 232 STLDeleteElements(&all_sessions_);
235 STLDeleteValues(&active_jobs_); 233 STLDeleteValues(&active_jobs_);
236 } 234 }
237 235
238 int QuicStreamFactory::Create(const HostPortProxyPair& host_port_proxy_pair, 236 int QuicStreamFactory::Create(const HostPortProxyPair& host_port_proxy_pair,
239 const BoundNetLog& net_log, 237 const BoundNetLog& net_log,
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 scoped_ptr<QuicHttpStream> QuicStreamFactory::CreateIfSessionExists( 294 scoped_ptr<QuicHttpStream> QuicStreamFactory::CreateIfSessionExists(
297 const HostPortProxyPair& host_port_proxy_pair, 295 const HostPortProxyPair& host_port_proxy_pair,
298 const BoundNetLog& net_log) { 296 const BoundNetLog& net_log) {
299 if (!HasActiveSession(host_port_proxy_pair)) { 297 if (!HasActiveSession(host_port_proxy_pair)) {
300 return scoped_ptr<QuicHttpStream>(NULL); 298 return scoped_ptr<QuicHttpStream>(NULL);
301 } 299 }
302 300
303 QuicClientSession* session = active_sessions_[host_port_proxy_pair]; 301 QuicClientSession* session = active_sessions_[host_port_proxy_pair];
304 DCHECK(session); 302 DCHECK(session);
305 return scoped_ptr<QuicHttpStream>( 303 return scoped_ptr<QuicHttpStream>(
306 new QuicHttpStream(session->CreateOutgoingReliableStream(), 304 new QuicHttpStream(session->CreateOutgoingReliableStream()));
307 use_spdy_over_quic_));
308 } 305 }
309 306
310 void QuicStreamFactory::OnIdleSession(QuicClientSession* session) { 307 void QuicStreamFactory::OnIdleSession(QuicClientSession* session) {
311 } 308 }
312 309
313 void QuicStreamFactory::OnSessionClose(QuicClientSession* session) { 310 void QuicStreamFactory::OnSessionClose(QuicClientSession* session) {
314 DCHECK_EQ(0u, session->GetNumOpenStreams()); 311 DCHECK_EQ(0u, session->GetNumOpenStreams());
315 const AliasSet& aliases = session_aliases_[session]; 312 const AliasSet& aliases = session_aliases_[session];
316 for (AliasSet::const_iterator it = aliases.begin(); it != aliases.end(); 313 for (AliasSet::const_iterator it = aliases.begin(); it != aliases.end();
317 ++it) { 314 ++it) {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 void QuicStreamFactory::ActivateSession( 388 void QuicStreamFactory::ActivateSession(
392 const HostPortProxyPair& host_port_proxy_pair, 389 const HostPortProxyPair& host_port_proxy_pair,
393 QuicClientSession* session) { 390 QuicClientSession* session) {
394 DCHECK(!HasActiveSession(host_port_proxy_pair)); 391 DCHECK(!HasActiveSession(host_port_proxy_pair));
395 active_sessions_[host_port_proxy_pair] = session; 392 active_sessions_[host_port_proxy_pair] = session;
396 session_aliases_[session].insert(host_port_proxy_pair); 393 session_aliases_[session].insert(host_port_proxy_pair);
397 } 394 }
398 395
399 396
400 } // namespace net 397 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_stream_factory.h ('k') | net/quic/quic_stream_factory_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698