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

Side by Side Diff: net/spdy/chromium/spdy_session_pool.cc

Issue 2930323002: Remove Request from Map in OnNewSpdySessionReady(). (Closed)
Patch Set: Re: #7. Created 3 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
« no previous file with comments | « net/http/http_stream_factory_impl_unittest.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) 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/spdy/chromium/spdy_session_pool.h" 5 #include "net/spdy/chromium/spdy_session_pool.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 // the first one. 414 // the first one.
415 // 415 //
416 // TODO(willchan): If it's important, switch RequestSet out for a FIFO 416 // TODO(willchan): If it's important, switch RequestSet out for a FIFO
417 // queue (Order by priority first, then FIFO within same priority). Unclear 417 // queue (Order by priority first, then FIFO within same priority). Unclear
418 // that it matters here. 418 // that it matters here.
419 auto iter = spdy_session_request_map_.find(spdy_session_key); 419 auto iter = spdy_session_request_map_.find(spdy_session_key);
420 if (iter == spdy_session_request_map_.end()) 420 if (iter == spdy_session_request_map_.end())
421 return; 421 return;
422 HttpStreamFactoryImpl::Request* request = *iter->second.begin(); 422 HttpStreamFactoryImpl::Request* request = *iter->second.begin();
423 request->Complete(was_alpn_negotiated, negotiated_protocol, using_spdy); 423 request->Complete(was_alpn_negotiated, negotiated_protocol, using_spdy);
424 RemoveRequestFromSpdySessionRequestMap(request);
424 if (request->stream_type() == HttpStreamRequest::BIDIRECTIONAL_STREAM) { 425 if (request->stream_type() == HttpStreamRequest::BIDIRECTIONAL_STREAM) {
425 request->OnBidirectionalStreamImplReady( 426 request->OnBidirectionalStreamImplReady(
426 used_ssl_config, used_proxy_info, 427 used_ssl_config, used_proxy_info,
427 base::MakeUnique<BidirectionalStreamSpdyImpl>(spdy_session, 428 base::MakeUnique<BidirectionalStreamSpdyImpl>(spdy_session,
428 source_dependency)); 429 source_dependency));
429 } else { 430 } else {
430 bool use_relative_url = 431 bool use_relative_url =
431 direct || request->url().SchemeIs(url::kHttpsScheme); 432 direct || request->url().SchemeIs(url::kHttpsScheme);
432 request->OnStreamReady( 433 request->OnStreamReady(
433 used_ssl_config, used_proxy_info, 434 used_ssl_config, used_proxy_info,
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 575
575 if (idle_only && (*it)->is_active()) 576 if (idle_only && (*it)->is_active())
576 continue; 577 continue;
577 578
578 (*it)->CloseSessionOnError(error, description); 579 (*it)->CloseSessionOnError(error, description);
579 DCHECK(!IsSessionAvailable(*it)); 580 DCHECK(!IsSessionAvailable(*it));
580 } 581 }
581 } 582 }
582 583
583 } // namespace net 584 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_stream_factory_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698