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

Unified Diff: net/quic/chromium/quic_http_stream.cc

Issue 2848923004: Move the "wait for QUIC handshake confirmation" logic to QuicChromiumClientSession::StreamRequest (Closed)
Patch Set: fix 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/chromium/quic_http_stream.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/chromium/quic_http_stream.cc
diff --git a/net/quic/chromium/quic_http_stream.cc b/net/quic/chromium/quic_http_stream.cc
index 049ab3d9206f41f8370b496ccfafe56781b3e4b6..5269a7a1fc4d82a5006a9ed06e82d3f4189ff3a8 100644
--- a/net/quic/chromium/quic_http_stream.cc
+++ b/net/quic/chromium/quic_http_stream.cc
@@ -520,12 +520,6 @@ bool QuicHttpStream::HasSendHeadersComplete() {
void QuicHttpStream::OnCryptoHandshakeConfirmed() {
was_handshake_confirmed_ = true;
- if (next_state_ == STATE_WAIT_FOR_CONFIRMATION_COMPLETE) {
- // Post a task to avoid reentrant calls into the session.
- base::ThreadTaskRunnerHandle::Get()->PostTask(
- FROM_HERE, base::Bind(&QuicHttpStream::OnIOComplete,
- weak_factory_.GetWeakPtr(), OK));
- }
}
void QuicHttpStream::OnSuccessfulVersionNegotiation(
@@ -586,13 +580,6 @@ int QuicHttpStream::DoLoop(int rv) {
CHECK_EQ(OK, rv);
rv = DoSetRequestPriority();
break;
- case STATE_WAIT_FOR_CONFIRMATION:
- CHECK_EQ(OK, rv);
- rv = DoWaitForConfirmation();
- break;
- case STATE_WAIT_FOR_CONFIRMATION_COMPLETE:
- rv = DoWaitForConfirmationComplete(rv);
- break;
case STATE_SEND_HEADERS:
CHECK_EQ(OK, rv);
rv = DoSendHeaders();
@@ -629,7 +616,8 @@ int QuicHttpStream::DoLoop(int rv) {
int QuicHttpStream::DoRequestStream() {
next_state_ = STATE_REQUEST_STREAM_COMPLETE;
- stream_request_ = session_->CreateStreamRequest();
+ stream_request_ =
+ session_->CreateStreamRequest(request_info_->method == "POST");
return stream_request_->StartRequest(
base::Bind(&QuicHttpStream::OnIOComplete, weak_factory_.GetWeakPtr()));
}
@@ -665,23 +653,6 @@ int QuicHttpStream::DoSetRequestPriority() {
DCHECK(response_info_);
SpdyPriority priority = ConvertRequestPriorityToQuicPriority(priority_);
stream_->SetPriority(priority);
- next_state_ = STATE_WAIT_FOR_CONFIRMATION;
- return OK;
-}
-
-int QuicHttpStream::DoWaitForConfirmation() {
- next_state_ = STATE_WAIT_FOR_CONFIRMATION_COMPLETE;
- if (!session_->IsCryptoHandshakeConfirmed() &&
- request_info_->method == "POST") {
- return ERR_IO_PENDING;
- }
- return OK;
-}
-
-int QuicHttpStream::DoWaitForConfirmationComplete(int rv) {
- if (rv < 0)
- return rv;
-
next_state_ = STATE_SEND_HEADERS;
return OK;
}
« no previous file with comments | « net/quic/chromium/quic_http_stream.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698