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

Unified Diff: net/quic/quic_http_stream.cc

Issue 2075903002: Reorder DoFoo methods in QuicHttpStream's .cc file to match .h and remove two unused methods from t… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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/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/quic_http_stream.cc
diff --git a/net/quic/quic_http_stream.cc b/net/quic/quic_http_stream.cc
index 78b793cbcaf3c53b91062a261c92ab3afa7bdba0..8d542072d79d9197cbb5ad4eb4fb67df8d976b22 100644
--- a/net/quic/quic_http_stream.cc
+++ b/net/quic/quic_http_stream.cc
@@ -174,41 +174,6 @@ int QuicHttpStream::InitializeStream(const HttpRequestInfo* request_info,
return rv;
}
-int QuicHttpStream::DoStreamRequest() {
- if (session_.get() == nullptr) {
- // TODO(rtenneti) Bug: b/28676259 - a temporary fix until we find out why
- // |session_| could be a nullptr.
- return was_handshake_confirmed_ ? ERR_CONNECTION_CLOSED
- : ERR_QUIC_HANDSHAKE_FAILED;
- }
- int rv = stream_request_.StartRequest(
- session_, &stream_,
- base::Bind(&QuicHttpStream::OnStreamReady, weak_factory_.GetWeakPtr()));
- if (rv == OK) {
- stream_->SetDelegate(this);
- if (request_info_->load_flags & LOAD_DISABLE_CONNECTION_MIGRATION) {
- stream_->DisableConnectionMigration();
- }
- if (response_info_) {
- next_state_ = STATE_SET_REQUEST_PRIORITY;
- }
- } else if (rv != ERR_IO_PENDING && !was_handshake_confirmed_) {
- rv = ERR_QUIC_HANDSHAKE_FAILED;
- }
- return rv;
-}
-
-int QuicHttpStream::DoSetRequestPriority() {
- // Set priority according to request and, and advance to
- // STATE_SEND_HEADERS.
- DCHECK(stream_);
- DCHECK(response_info_);
- SpdyPriority priority = ConvertRequestPriorityToQuicPriority(priority_);
- stream_->SetPriority(priority);
- next_state_ = STATE_SEND_HEADERS;
- return OK;
-}
-
void QuicHttpStream::OnStreamReady(int rv) {
DCHECK(rv == OK || !stream_);
if (rv == OK) {
@@ -631,6 +596,41 @@ int QuicHttpStream::DoLoop(int rv) {
return rv;
}
+int QuicHttpStream::DoStreamRequest() {
+ if (session_.get() == nullptr) {
+ // TODO(rtenneti) Bug: b/28676259 - a temporary fix until we find out why
+ // |session_| could be a nullptr.
+ return was_handshake_confirmed_ ? ERR_CONNECTION_CLOSED
+ : ERR_QUIC_HANDSHAKE_FAILED;
+ }
+ int rv = stream_request_.StartRequest(
+ session_, &stream_,
+ base::Bind(&QuicHttpStream::OnStreamReady, weak_factory_.GetWeakPtr()));
+ if (rv == OK) {
+ stream_->SetDelegate(this);
+ if (request_info_->load_flags & LOAD_DISABLE_CONNECTION_MIGRATION) {
+ stream_->DisableConnectionMigration();
+ }
+ if (response_info_) {
+ next_state_ = STATE_SET_REQUEST_PRIORITY;
+ }
+ } else if (rv != ERR_IO_PENDING && !was_handshake_confirmed_) {
+ rv = ERR_QUIC_HANDSHAKE_FAILED;
+ }
+ return rv;
+}
+
+int QuicHttpStream::DoSetRequestPriority() {
+ // Set priority according to request and, and advance to
+ // STATE_SEND_HEADERS.
+ DCHECK(stream_);
+ DCHECK(response_info_);
+ SpdyPriority priority = ConvertRequestPriorityToQuicPriority(priority_);
+ stream_->SetPriority(priority);
+ next_state_ = STATE_SEND_HEADERS;
+ return OK;
+}
+
int QuicHttpStream::DoSendHeaders() {
if (!stream_)
return ERR_UNEXPECTED;
« no previous file with comments | « net/quic/quic_http_stream.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698