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

Unified Diff: net/spdy/spdy_session.cc

Issue 1360253002: Log GOAWAY frame debug data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re: #12. Created 5 years, 2 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/spdy/spdy_session.h ('k') | net/spdy/spdy_session_unittest.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 4055422f3137b1fa5baa74a0d45f3da89c817cc9..9c1c7a7a9d53d3b847b6a4779f1503c0faee29d8 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -257,13 +257,16 @@ scoped_ptr<base::Value> NetLogSpdyGoAwayCallback(
int active_streams,
int unclaimed_streams,
SpdyGoAwayStatus status,
- NetLogCaptureMode /* capture_mode */) {
+ StringPiece debug_data,
+ NetLogCaptureMode capture_mode) {
scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
dict->SetInteger("last_accepted_stream_id",
static_cast<int>(last_stream_id));
dict->SetInteger("active_streams", active_streams);
dict->SetInteger("unclaimed_streams", unclaimed_streams);
dict->SetInteger("status", static_cast<int>(status));
+ dict->SetString("debug_data",
+ ElideGoAwayDebugDataForNetLog(capture_mode, debug_data));
return dict.Pass();
}
@@ -2452,15 +2455,17 @@ void SpdySession::OnRstStream(SpdyStreamId stream_id,
}
void SpdySession::OnGoAway(SpdyStreamId last_accepted_stream_id,
- SpdyGoAwayStatus status) {
+ SpdyGoAwayStatus status,
+ StringPiece debug_data) {
CHECK(in_io_loop_);
// TODO(jgraettinger): UMA histogram on |status|.
- net_log_.AddEvent(NetLog::TYPE_HTTP2_SESSION_GOAWAY,
- base::Bind(&NetLogSpdyGoAwayCallback,
- last_accepted_stream_id, active_streams_.size(),
- unclaimed_pushed_streams_.size(), status));
+ net_log_.AddEvent(
+ NetLog::TYPE_HTTP2_SESSION_GOAWAY,
+ base::Bind(&NetLogSpdyGoAwayCallback, last_accepted_stream_id,
+ active_streams_.size(), unclaimed_pushed_streams_.size(),
+ status, debug_data));
MakeUnavailable();
if (status == GOAWAY_HTTP_1_1_REQUIRED) {
// TODO(bnc): Record histogram with number of open streams capped at 50.
« no previous file with comments | « net/spdy/spdy_session.h ('k') | net/spdy/spdy_session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698