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

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

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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_http_stream_test.cc ('k') | net/socket/ssl_client_socket_nss.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/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 const BoundNetLog& net_log) { 370 const BoundNetLog& net_log) {
371 QuicGuid guid = random_generator_->RandUint64(); 371 QuicGuid guid = random_generator_->RandUint64();
372 IPEndPoint addr = *address_list.begin(); 372 IPEndPoint addr = *address_list.begin();
373 DatagramClientSocket* socket = 373 DatagramClientSocket* socket =
374 client_socket_factory_->CreateDatagramClientSocket( 374 client_socket_factory_->CreateDatagramClientSocket(
375 DatagramSocket::DEFAULT_BIND, base::Bind(&base::RandInt), 375 DatagramSocket::DEFAULT_BIND, base::Bind(&base::RandInt),
376 net_log.net_log(), net_log.source()); 376 net_log.net_log(), net_log.source());
377 socket->Connect(addr); 377 socket->Connect(addr);
378 378
379 QuicConnectionHelper* helper = new QuicConnectionHelper( 379 QuicConnectionHelper* helper = new QuicConnectionHelper(
380 base::MessageLoop::current()->message_loop_proxy(), 380 base::MessageLoop::current()->message_loop_proxy().get(),
381 clock_.get(), random_generator_, socket); 381 clock_.get(),
382 random_generator_,
383 socket);
382 384
383 QuicConnection* connection = new QuicConnection(guid, addr, helper, false); 385 QuicConnection* connection = new QuicConnection(guid, addr, helper, false);
384 386
385 QuicCryptoClientConfig* crypto_config = 387 QuicCryptoClientConfig* crypto_config =
386 GetOrCreateCryptoConfig(host_port_proxy_pair); 388 GetOrCreateCryptoConfig(host_port_proxy_pair);
387 DCHECK(crypto_config); 389 DCHECK(crypto_config);
388 390
389 QuicClientSession* session = 391 QuicClientSession* session =
390 new QuicClientSession(connection, socket, this, 392 new QuicClientSession(connection, socket, this,
391 quic_crypto_client_stream_factory_, 393 quic_crypto_client_stream_factory_,
(...skipping 24 matching lines...) Expand all
416 DCHECK(crypto_config); 418 DCHECK(crypto_config);
417 } else { 419 } else {
418 crypto_config = new QuicCryptoClientConfig(); 420 crypto_config = new QuicCryptoClientConfig();
419 crypto_config->SetDefaults(); 421 crypto_config->SetDefaults();
420 all_crypto_configs_[host_port_proxy_pair] = crypto_config; 422 all_crypto_configs_[host_port_proxy_pair] = crypto_config;
421 } 423 }
422 return crypto_config; 424 return crypto_config;
423 } 425 }
424 426
425 } // namespace net 427 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_http_stream_test.cc ('k') | net/socket/ssl_client_socket_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698