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

Unified Diff: net/http/http_stream_factory_impl_job.h

Issue 1586513002: QUIC - Whne alternate job decides to delay the main(TCP) job and if the (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix comments Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_stream_factory_impl.h ('k') | net/http/http_stream_factory_impl_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_factory_impl_job.h
diff --git a/net/http/http_stream_factory_impl_job.h b/net/http/http_stream_factory_impl_job.h
index 5e935cc14d3af6370fd055db6fe72fa3468bc02d..6a44b33236078834fd34c787f0d1d673afcdc47d 100644
--- a/net/http/http_stream_factory_impl_job.h
+++ b/net/http/http_stream_factory_impl_job.h
@@ -113,6 +113,8 @@ class HttpStreamFactoryImpl::Job {
void MarkOtherJobComplete(const Job& job);
private:
+ FRIEND_TEST_ALL_PREFIXES(HttpStreamFactoryImplRequestTest, DelayMainJob);
+
enum State {
STATE_START,
STATE_RESOLVE_PROXY,
@@ -133,6 +135,8 @@ class HttpStreamFactoryImpl::Job {
// The npn-spdy job will Resume() the http job if, in
// STATE_INIT_CONNECTION_COMPLETE, it detects an error or does not find an
// existing SpdySession. In that case, the http and npn-spdy jobs will race.
+ // When QUIC protocol is used by the npn-spdy job, then http job will wait
+ // for |wait_time_| when the http job was resumed.
STATE_WAIT_FOR_JOB,
STATE_WAIT_FOR_JOB_COMPLETE,
@@ -201,6 +205,9 @@ class HttpStreamFactoryImpl::Job {
const bool is_spdy_alternative_;
};
+ // Resume the |this| job after the specified |wait_time_|.
+ void ResumeAfterDelay();
+
void OnStreamReadyCallback();
void OnBidirectionalStreamJobReadyCallback();
void OnWebSocketHandshakeStreamReadyCallback();
@@ -352,6 +359,8 @@ class HttpStreamFactoryImpl::Job {
// proceed and then race the two Jobs.
Job* waiting_job_;
+ base::TimeDelta wait_time_;
+
// True if handling a HTTPS request, or using SPDY with SSL
bool using_ssl_;
« no previous file with comments | « net/http/http_stream_factory_impl.h ('k') | net/http/http_stream_factory_impl_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698