Chromium Code Reviews

Unified Diff: net/spdy/spdy_session.cc

Issue 2783683002: Log source_dependency in HTTP2_SESSION_SEND_HEADERS. (Closed)
Patch Set: Fix use-after-free. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « net/spdy/spdy_session.h ('k') | net/spdy/spdy_session_fuzzer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session.cc
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
index 6cd6c9443421d754a3772150e7c44e84a755dd2b..afbf526e4cd8a9bdfe01676f0f1c86a5108c60bc 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -41,7 +41,6 @@
#include "net/log/net_log.h"
#include "net/log/net_log_capture_mode.h"
#include "net/log/net_log_event_type.h"
-#include "net/log/net_log_source.h"
#include "net/log/net_log_source_type.h"
#include "net/log/net_log_with_source.h"
#include "net/proxy/proxy_server.h"
@@ -111,6 +110,7 @@ std::unique_ptr<base::Value> NetLogSpdyHeadersSentCallback(
int weight,
SpdyStreamId parent_stream_id,
bool exclusive,
+ NetLogSource source_dependency,
NetLogCaptureMode capture_mode) {
auto dict = base::MakeUnique<base::DictionaryValue>();
dict->Set("headers", ElideSpdyHeaderBlockForNetLog(*headers, capture_mode));
@@ -122,6 +122,9 @@ std::unique_ptr<base::Value> NetLogSpdyHeadersSentCallback(
dict->SetInteger("weight", weight);
dict->SetBoolean("exclusive", exclusive);
}
+ if (source_dependency.IsValid()) {
+ source_dependency.AddToEventParameters(dict.get());
+ }
return std::move(dict);
}
@@ -941,7 +944,8 @@ std::unique_ptr<SpdySerializedFrame> SpdySession::CreateHeaders(
SpdyStreamId stream_id,
RequestPriority priority,
SpdyControlFlags flags,
- SpdyHeaderBlock block) {
+ SpdyHeaderBlock block,
+ NetLogSource source_dependency) {
ActiveStreamMap::const_iterator it = active_streams_.find(stream_id);
CHECK(it != active_streams_.end());
CHECK_EQ(it->second->stream_id(), stream_id);
@@ -965,7 +969,7 @@ std::unique_ptr<SpdySerializedFrame> SpdySession::CreateHeaders(
NetLogEventType::HTTP2_SESSION_SEND_HEADERS,
base::Bind(&NetLogSpdyHeadersSentCallback, &block,
(flags & CONTROL_FLAG_FIN) != 0, stream_id, has_priority,
- weight, dependent_stream_id, exclusive));
+ weight, dependent_stream_id, exclusive, source_dependency));
}
SpdyHeadersIR headers(stream_id, std::move(block));
« no previous file with comments | « net/spdy/spdy_session.h ('k') | net/spdy/spdy_session_fuzzer.cc » ('j') | no next file with comments »

Powered by Google App Engine