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

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

Issue 16207005: Fix remaining uses of WeakPtr<T>'s operator T* conversion (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | « media/audio/audio_output_dispatcher_impl.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_proxy.h" 10 #include "base/message_loop_proxy.h"
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 return OK; 246 return OK;
247 } 247 }
248 248
249 if (HasActiveJob(host_port_proxy_pair)) { 249 if (HasActiveJob(host_port_proxy_pair)) {
250 Job* job = active_jobs_[host_port_proxy_pair]; 250 Job* job = active_jobs_[host_port_proxy_pair];
251 active_requests_[request] = job; 251 active_requests_[request] = job;
252 job_requests_map_[job].insert(request); 252 job_requests_map_[job].insert(request);
253 return ERR_IO_PENDING; 253 return ERR_IO_PENDING;
254 } 254 }
255 255
256 Job* job = new Job(weak_factory_.GetWeakPtr(), host_resolver_, 256 Job* job = new Job(this, host_resolver_, host_port_proxy_pair, net_log);
257 host_port_proxy_pair, net_log);
258 int rv = job->Run(base::Bind(&QuicStreamFactory::OnJobComplete, 257 int rv = job->Run(base::Bind(&QuicStreamFactory::OnJobComplete,
259 base::Unretained(this), job)); 258 base::Unretained(this), job));
260 259
261 if (rv == ERR_IO_PENDING) { 260 if (rv == ERR_IO_PENDING) {
262 active_jobs_[host_port_proxy_pair] = job; 261 active_jobs_[host_port_proxy_pair] = job;
263 job_requests_map_[job].insert(request); 262 job_requests_map_[job].insert(request);
264 active_requests_[request] = job; 263 active_requests_[request] = job;
265 } 264 }
266 if (rv == OK) { 265 if (rv == OK) {
267 DCHECK(HasActiveSession(host_port_proxy_pair)); 266 DCHECK(HasActiveSession(host_port_proxy_pair));
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 DCHECK(crypto_config); 416 DCHECK(crypto_config);
418 } else { 417 } else {
419 crypto_config = new QuicCryptoClientConfig(); 418 crypto_config = new QuicCryptoClientConfig();
420 crypto_config->SetDefaults(); 419 crypto_config->SetDefaults();
421 all_crypto_configs_[host_port_proxy_pair] = crypto_config; 420 all_crypto_configs_[host_port_proxy_pair] = crypto_config;
422 } 421 }
423 return crypto_config; 422 return crypto_config;
424 } 423 }
425 424
426 } // namespace net 425 } // namespace net
OLDNEW
« no previous file with comments | « media/audio/audio_output_dispatcher_impl.cc ('k') | net/socket/ssl_client_socket_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698