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

Side by Side Diff: net/http/http_stream_factory_impl_job_controller.h

Issue 2958133002: Change QuicStreamRequest::Request() to take a preferred QuicVersion so that (Closed)
Patch Set: Add QuicStreamFactoryTest Created 3 years, 5 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) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_ 5 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_
6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_ 6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "net/base/host_port_pair.h" 10 #include "net/base/host_port_pair.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 // for this SpdySessionKey, since we may need to wait for NPN to complete 156 // for this SpdySessionKey, since we may need to wait for NPN to complete
157 // before knowing if SPDY is available. 157 // before knowing if SPDY is available.
158 void SetSpdySessionKey(Job* job, 158 void SetSpdySessionKey(Job* job,
159 const SpdySessionKey& spdy_session_key) override; 159 const SpdySessionKey& spdy_session_key) override;
160 160
161 // Remove session from the SpdySessionRequestMap. 161 // Remove session from the SpdySessionRequestMap.
162 void RemoveRequestFromSpdySessionRequestMapForJob(Job* job) override; 162 void RemoveRequestFromSpdySessionRequestMapForJob(Job* job) override;
163 163
164 const NetLogWithSource* GetNetLog() const override; 164 const NetLogWithSource* GetNetLog() const override;
165 165
166 const QuicVersionVector& GetAdvertisedQuicVersions() const override;
167
166 void MaybeSetWaitTimeForMainJob(const base::TimeDelta& delay) override; 168 void MaybeSetWaitTimeForMainJob(const base::TimeDelta& delay) override;
167 169
168 WebSocketHandshakeStreamBase::CreateHelper* 170 WebSocketHandshakeStreamBase::CreateHelper*
169 websocket_handshake_stream_create_helper() override; 171 websocket_handshake_stream_create_helper() override;
170 172
171 bool is_preconnect() const { return is_preconnect_; } 173 bool is_preconnect() const { return is_preconnect_; }
172 174
173 // Returns true if |this| has a pending request that is not completed. 175 // Returns true if |this| has a pending request that is not completed.
174 bool HasPendingRequest() const { return request_ != nullptr; } 176 bool HasPendingRequest() const { return request_ != nullptr; }
175 177
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 // Enable using alternative services for the request. 316 // Enable using alternative services for the request.
315 const bool enable_alternative_services_; 317 const bool enable_alternative_services_;
316 318
317 // |main_job_| is a job waiting to see if |alternative_job_| can reuse a 319 // |main_job_| is a job waiting to see if |alternative_job_| can reuse a
318 // connection. If |alternative_job_| is unable to do so, |this| will notify 320 // connection. If |alternative_job_| is unable to do so, |this| will notify
319 // |main_job_| to proceed and then race the two jobs. 321 // |main_job_| to proceed and then race the two jobs.
320 std::unique_ptr<Job> main_job_; 322 std::unique_ptr<Job> main_job_;
321 std::unique_ptr<Job> alternative_job_; 323 std::unique_ptr<Job> alternative_job_;
322 // The alternative service used by |alternative_job_| 324 // The alternative service used by |alternative_job_|
323 // (or by |main_job_| if |is_preconnect_|.) 325 // (or by |main_job_| if |is_preconnect_|.)
324 AlternativeService alternative_service_; 326 AlternativeServiceInfo alternative_service_info_;
325 327
326 // Net error code of the failed alternative job. Set to OK by default. 328 // Net error code of the failed alternative job. Set to OK by default.
327 int alternative_job_net_error_; 329 int alternative_job_net_error_;
328 330
329 // True if a Job has ever been bound to the |request_|. 331 // True if a Job has ever been bound to the |request_|.
330 bool job_bound_; 332 bool job_bound_;
331 333
332 // True if the main job has to wait for the alternative job: i.e., the main 334 // True if the main job has to wait for the alternative job: i.e., the main
333 // job must not create a connection until it is resumed. 335 // job must not create a connection until it is resumed.
334 bool main_job_is_blocked_; 336 bool main_job_is_blocked_;
(...skipping 22 matching lines...) Expand all
357 HttpStreamRequest::StreamType stream_type_; 359 HttpStreamRequest::StreamType stream_type_;
358 RequestPriority priority_; 360 RequestPriority priority_;
359 const NetLogWithSource net_log_; 361 const NetLogWithSource net_log_;
360 362
361 base::WeakPtrFactory<JobController> ptr_factory_; 363 base::WeakPtrFactory<JobController> ptr_factory_;
362 }; 364 };
363 365
364 } // namespace net 366 } // namespace net
365 367
366 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_ 368 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698