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

Side by Side Diff: net/http/http_stream_factory_impl_request.cc

Issue 2784143003: Fix a potential infinite loop in HttpStreamFactoryImpl when a new SpdySession is established (Closed)
Patch Set: Address comments Created 3 years, 8 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
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/http/http_stream_factory_impl_request.h" 5 #include "net/http/http_stream_factory_impl_request.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "net/http/bidirectional_stream_impl.h" 10 #include "net/http/bidirectional_stream_impl.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 bool HttpStreamFactoryImpl::Request::using_spdy() const { 147 bool HttpStreamFactoryImpl::Request::using_spdy() const {
148 DCHECK(completed_); 148 DCHECK(completed_);
149 return using_spdy_; 149 return using_spdy_;
150 } 150 }
151 151
152 const ConnectionAttempts& HttpStreamFactoryImpl::Request::connection_attempts() 152 const ConnectionAttempts& HttpStreamFactoryImpl::Request::connection_attempts()
153 const { 153 const {
154 return connection_attempts_; 154 return connection_attempts_;
155 } 155 }
156 156
157 void HttpStreamFactoryImpl::Request::ResetSpdySessionKey() {
158 if (spdy_session_key_.get()) {
159 spdy_session_key_.reset();
160 }
161 }
162
163 bool HttpStreamFactoryImpl::Request::HasSpdySessionKey() const { 157 bool HttpStreamFactoryImpl::Request::HasSpdySessionKey() const {
164 return spdy_session_key_.get() != NULL; 158 return spdy_session_key_.get() != NULL;
165 } 159 }
166 160
167 void HttpStreamFactoryImpl::Request::AddConnectionAttempts( 161 void HttpStreamFactoryImpl::Request::AddConnectionAttempts(
168 const ConnectionAttempts& attempts) { 162 const ConnectionAttempts& attempts) {
169 for (const auto& attempt : attempts) 163 for (const auto& attempt : attempts)
170 connection_attempts_.push_back(attempt); 164 connection_attempts_.push_back(attempt);
171 } 165 }
172 166
173 } // namespace net 167 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_stream_factory_impl_request.h ('k') | net/http/http_stream_factory_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698