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

Unified Diff: net/quic/quic_chromium_client_stream.cc

Issue 1824403002: Add logging for headers sent and received in BidirectionalStreamQuicImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments Created 4 years, 9 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_chromium_client_stream.h ('k') | net/quic/quic_http_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_chromium_client_stream.cc
diff --git a/net/quic/quic_chromium_client_stream.cc b/net/quic/quic_chromium_client_stream.cc
index ef71bf17c8f73f93dddb0e7120e3f1d22294c1a4..5d9946cdc4e5b2bae57157b07971131a1186f655 100644
--- a/net/quic/quic_chromium_client_stream.cc
+++ b/net/quic/quic_chromium_client_stream.cc
@@ -10,6 +10,7 @@
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "net/quic/quic_chromium_client_session.h"
+#include "net/quic/quic_http_utils.h"
#include "net/quic/quic_spdy_session.h"
#include "net/quic/quic_write_blocked_list.h"
#include "net/quic/spdy_utils.h"
@@ -104,6 +105,17 @@ void QuicChromiumClientStream::OnCanWrite() {
}
}
+size_t QuicChromiumClientStream::WriteHeaders(
+ const SpdyHeaderBlock& header_block,
+ bool fin,
+ QuicAckListenerInterface* ack_notifier_delegate) {
+ net_log_.AddEvent(
+ NetLog::TYPE_QUIC_CHROMIUM_CLIENT_STREAM_SEND_REQUEST_HEADERS,
+ base::Bind(&QuicRequestNetLogCallback, id(), &header_block,
+ QuicSpdyStream::priority()));
+ return QuicSpdyStream::WriteHeaders(header_block, fin, ack_notifier_delegate);
+}
+
SpdyPriority QuicChromiumClientStream::priority() const {
if (delegate_ && delegate_->HasSendHeadersComplete()) {
return QuicSpdyStream::priority();
@@ -187,10 +199,18 @@ void QuicChromiumClientStream::NotifyDelegateOfHeadersComplete(
if (!delegate_)
return;
// Only mark trailers consumed when we are about to notify delegate.
- if (headers_delivered_)
+ if (headers_delivered_) {
MarkTrailersConsumed(decompressed_trailers().length());
+ net_log_.AddEvent(
+ NetLog::TYPE_QUIC_CHROMIUM_CLIENT_STREAM_READ_RESPONSE_TRAILERS,
+ base::Bind(&SpdyHeaderBlockNetLogCallback, &headers));
+ } else {
+ headers_delivered_ = true;
+ net_log_.AddEvent(
+ NetLog::TYPE_QUIC_CHROMIUM_CLIENT_STREAM_READ_RESPONSE_HEADERS,
+ base::Bind(&SpdyHeaderBlockNetLogCallback, &headers));
+ }
- headers_delivered_ = true;
delegate_->OnHeadersAvailable(headers, frame_len);
}
« no previous file with comments | « net/quic/quic_chromium_client_stream.h ('k') | net/quic/quic_http_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698