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

Unified Diff: net/quic/quic_spdy_stream.cc

Issue 2104633002: Landing recent QUIC changes until 6/24/2016 14:00 UTC (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_spdy_stream.h ('k') | net/quic/quic_spdy_stream_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_spdy_stream.cc
diff --git a/net/quic/quic_spdy_stream.cc b/net/quic/quic_spdy_stream.cc
index d0af94d2bbca2aa8f25722b8a5e1438919ae86c7..7b1b3ee85e17313b7012e97a933426711da6f071 100644
--- a/net/quic/quic_spdy_stream.cc
+++ b/net/quic/quic_spdy_stream.cc
@@ -14,8 +14,8 @@
#include "net/quic/quic_write_blocked_list.h"
#include "net/quic/spdy_utils.h"
+using base::IntToString;
using base::StringPiece;
-using net::SpdyPriority;
using std::min;
using std::string;
@@ -104,7 +104,7 @@ size_t QuicSpdyStream::WriteTrailers(
<< stream_bytes_written() + queued_data_bytes() << ")";
trailer_block.insert(std::make_pair(
kFinalOffsetHeaderKey,
- base::IntToString(stream_bytes_written() + queued_data_bytes())));
+ IntToString(stream_bytes_written() + queued_data_bytes())));
// Write the trailing headers with a FIN, and close stream for writing:
// trailers are the last thing to be sent on a stream.
@@ -361,9 +361,13 @@ bool QuicSpdyStream::FinishedReadingHeaders() const {
header_list_.empty();
}
-bool QuicSpdyStream::ParseHeaderStatusCode(SpdyHeaderBlock* header,
+bool QuicSpdyStream::ParseHeaderStatusCode(const SpdyHeaderBlock& header,
int* status_code) const {
- StringPiece status = (*header)[":status"];
+ SpdyHeaderBlock::const_iterator it = header.find(":status");
+ if (it == header.end()) {
+ return false;
+ }
+ const StringPiece status(it->second);
if (status.size() != 3) {
return false;
}
« no previous file with comments | « net/quic/quic_spdy_stream.h ('k') | net/quic/quic_spdy_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698