Log source_dependency in HTTP2_SESSION_SEND_HEADERS.
Pass in HttpStreamFactoryImpl::Job's NetLog source as source_dependency
to SpdyHttpStream and BidirectionalStreamSpdyImpl, where it is saved in
a private member.
Save HttpProxyClientSocketWrapper's NetLog source in
SpdyProxyClientSocket constructor (NetLog object was already passed in).
Add SpdyStream::Delegate::source_dependency() and log it in
SpdySession::CreateHeaders().
Add dummy implementation to test-only classes FuzzerDelegate,
SessionOpeningDelegate, ClosingDelegate, and StreamDelegateBase.
Example NetLog excerpt:
1567: HTTP_STREAM_JOB
https://clients1.google.com/
Start Time: 2017-03-29 09:09:35.617
t=9692 [st= 0] +HTTP_STREAM_JOB [dt=74]
--> alternative_service = "unknown :0"
--> original_url = "https://clients1.google.com/"
--> priority = "LOWEST"
--> source_dependency = 1566 (HTTP_STREAM_JOB_CONTROLLER)
--> url = "https://clients1.google.com/"
[...]
t=9764 [st=72] HTTP2_SESSION_POOL_IMPORTED_SESSION_FROM_SOCKET
--> source_dependency = 1576 (HTTP2_SESSION)
t=9766 [st=74] HTTP_STREAM_JOB_BOUND_TO_REQUEST
--> source_dependency = 1565 (URL_REQUEST)
t=9766 [st=74] -HTTP_STREAM_JOB
1576: HTTP2_SESSION
clients1.google.com:443 (DIRECT)
Start Time: 2017-03-29 09:09:35.688
t= 9763 [st= 0] +HTTP2_SESSION [dt=318+]
--> host = "clients1.google.com:443"
--> proxy = "DIRECT"
t= 9763 [st= 0] HTTP2_SESSION_INITIALIZED
--> protocol = "h2"
--> source_dependency = 1573 (SOCKET)
[...]
t= 9768 [st= 5] HTTP2_SESSION_SEND_HEADERS
--> exclusive = true
--> fin = false
--> has_priority = true
--> :method: POST
:authority: clients1.google.com
:scheme: https
:path: /tbproxy/af/query?client=Chromium
content-length: 113
content-type: text/proto
user-agent: [...]
accept-encoding: gzip, deflate, br
accept-language: en-US,en;q=0.8
--> parent_stream_id = 0
--> source_dependency = 1567 (HTTP_STREAM_JOB)
--> stream_id = 1
--> weight = 147
t= 9769 [st= 6] HTTP2_SESSION_SEND_DATA
--> fin = true
--> size = 113
--> stream_id = 1
[...]
1567 HTTP_STREAM_JOB's HTTP2_SESSION_POOL_IMPORTED_SESSION_FROM_SOCKET already
had a source_dependency pointing to 1576 HTTP2_SESSION before this CL. This CL
adds the reverse direction: 1576 HTTP2_SESSION's HTTP2_SESSION_SEND_HEADERS
now has a source_dependency pointing to 1567 HTTP_STREAM_JOB.
BUG=705967
Review-Url: https://codereview.chromium.org/2783683002
Cr-Commit-Position: refs/heads/master@{#460365}
diff --git a/net/spdy/bidirectional_stream_spdy_impl.cc b/net/spdy/bidirectional_stream_spdy_impl.cc
index 07f240d..e926201 100644
--- a/net/spdy/bidirectional_stream_spdy_impl.cc
+++ b/net/spdy/bidirectional_stream_spdy_impl.cc
@@ -30,10 +30,12 @@
} // namespace
BidirectionalStreamSpdyImpl::BidirectionalStreamSpdyImpl(
- const base::WeakPtr<SpdySession>& spdy_session)
+ const base::WeakPtr<SpdySession>& spdy_session,
+ NetLogSource source_dependency)
: spdy_session_(spdy_session),
request_info_(nullptr),
delegate_(nullptr),
+ source_dependency_(source_dependency),
negotiated_protocol_(kProtoUnknown),
more_read_data_pending_(false),
read_buffer_len_(0),
@@ -293,6 +295,10 @@
OnDataSent();
}
+NetLogSource BidirectionalStreamSpdyImpl::source_dependency() const {
+ return source_dependency_;
+}
+
int BidirectionalStreamSpdyImpl::SendRequestHeadersHelper() {
SpdyHeaderBlock headers;
HttpRequestInfo http_request_info;