OLD | NEW |
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.h" | 5 #include "net/http/http_stream_factory_impl.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 if (!spdy_session) | 179 if (!spdy_session) |
180 break; | 180 break; |
181 const SpdySessionKey& spdy_session_key = spdy_session->spdy_session_key(); | 181 const SpdySessionKey& spdy_session_key = spdy_session->spdy_session_key(); |
182 // Each iteration may empty out the RequestSet for |spdy_session_key| in | 182 // Each iteration may empty out the RequestSet for |spdy_session_key| in |
183 // |spdy_session_request_map_|. So each time, check for RequestSet and use | 183 // |spdy_session_request_map_|. So each time, check for RequestSet and use |
184 // the first one. | 184 // the first one. |
185 // | 185 // |
186 // TODO(willchan): If it's important, switch RequestSet out for a FIFO | 186 // TODO(willchan): If it's important, switch RequestSet out for a FIFO |
187 // queue (Order by priority first, then FIFO within same priority). Unclear | 187 // queue (Order by priority first, then FIFO within same priority). Unclear |
188 // that it matters here. | 188 // that it matters here. |
189 if (!ContainsKey(spdy_session_request_map_, spdy_session_key)) | 189 if (!base::ContainsKey(spdy_session_request_map_, spdy_session_key)) |
190 break; | 190 break; |
191 Request* request = *spdy_session_request_map_[spdy_session_key].begin(); | 191 Request* request = *spdy_session_request_map_[spdy_session_key].begin(); |
192 request->Complete(was_npn_negotiated, negotiated_protocol, using_spdy); | 192 request->Complete(was_npn_negotiated, negotiated_protocol, using_spdy); |
193 if (for_websockets_) { | 193 if (for_websockets_) { |
194 // TODO(ricea): Restore this code path when WebSocket over SPDY | 194 // TODO(ricea): Restore this code path when WebSocket over SPDY |
195 // implementation is ready. | 195 // implementation is ready. |
196 NOTREACHED(); | 196 NOTREACHED(); |
197 } else if (request->stream_type() == | 197 } else if (request->stream_type() == |
198 HttpStreamRequest::BIDIRECTIONAL_STREAM) { | 198 HttpStreamRequest::BIDIRECTIONAL_STREAM) { |
199 request->OnBidirectionalStreamImplReady( | 199 request->OnBidirectionalStreamImplReady( |
(...skipping 14 matching lines...) Expand all Loading... |
214 ++it) { | 214 ++it) { |
215 if (it->get() == controller) { | 215 if (it->get() == controller) { |
216 job_controller_set_.erase(it); | 216 job_controller_set_.erase(it); |
217 return; | 217 return; |
218 } | 218 } |
219 } | 219 } |
220 NOTREACHED(); | 220 NOTREACHED(); |
221 } | 221 } |
222 | 222 |
223 } // namespace net | 223 } // namespace net |
OLD | NEW |