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

Unified Diff: net/spdy/spdy_session.cc

Issue 2675723003: Improve NetLog HTTP/2 event names. (Closed)
Patch Set: Rebase. Created 3 years, 10 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/log/net_log_event_type_list.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 fd9650fc9e09bd13d9a68e51b19ea837420c4341..be8bb74c784cb69920a3b359fcf7038e033dcba7 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -226,7 +226,17 @@ std::unique_ptr<base::Value> NetLogSpdyDataCallback(
return std::move(dict);
}
-std::unique_ptr<base::Value> NetLogSpdyRstCallback(
+std::unique_ptr<base::Value> NetLogSpdyRecvRstStreamCallback(
+ SpdyStreamId stream_id,
+ int error_code,
+ NetLogCaptureMode /* capture_mode */) {
+ auto dict = base::MakeUnique<base::DictionaryValue>();
+ dict->SetInteger("stream_id", static_cast<int>(stream_id));
+ dict->SetInteger("status", error_code);
+ return std::move(dict);
+}
+
+std::unique_ptr<base::Value> NetLogSpdySendRstStreamCallback(
SpdyStreamId stream_id,
int error_code,
const std::string* description,
@@ -250,7 +260,7 @@ std::unique_ptr<base::Value> NetLogSpdyPingCallback(
return std::move(dict);
}
-std::unique_ptr<base::Value> NetLogSpdyGoAwayCallback(
+std::unique_ptr<base::Value> NetLogSpdyRecvGoAwayCallback(
SpdyStreamId last_stream_id,
int active_streams,
int unclaimed_streams,
@@ -1340,9 +1350,9 @@ void SpdySession::EnqueueResetStreamFrame(SpdyStreamId stream_id,
const std::string& description) {
DCHECK_NE(stream_id, 0u);
- net_log().AddEvent(
- NetLogEventType::HTTP2_SESSION_SEND_RST_STREAM,
- base::Bind(&NetLogSpdyRstCallback, stream_id, error_code, &description));
+ net_log().AddEvent(NetLogEventType::HTTP2_SESSION_SEND_RST_STREAM,
+ base::Bind(&NetLogSpdySendRstStreamCallback, stream_id,
+ error_code, &description));
DCHECK(buffered_spdy_framer_.get());
std::unique_ptr<SpdySerializedFrame> rst_frame(
@@ -2371,10 +2381,9 @@ void SpdySession::OnRstStream(SpdyStreamId stream_id,
SpdyErrorCode error_code) {
CHECK(in_io_loop_);
- std::string description;
net_log().AddEvent(
- NetLogEventType::HTTP2_SESSION_RST_STREAM,
- base::Bind(&NetLogSpdyRstCallback, stream_id, error_code, &description));
+ NetLogEventType::HTTP2_SESSION_RECV_RST_STREAM,
+ base::Bind(&NetLogSpdyRecvRstStreamCallback, stream_id, error_code));
ActiveStreamMap::iterator it = active_streams_.find(stream_id);
if (it == active_streams_.end()) {
@@ -2418,8 +2427,8 @@ void SpdySession::OnGoAway(SpdyStreamId last_accepted_stream_id,
// TODO(jgraettinger): UMA histogram on |error_code|.
net_log_.AddEvent(
- NetLogEventType::HTTP2_SESSION_GOAWAY,
- base::Bind(&NetLogSpdyGoAwayCallback, last_accepted_stream_id,
+ NetLogEventType::HTTP2_SESSION_RECV_GOAWAY,
+ base::Bind(&NetLogSpdyRecvGoAwayCallback, last_accepted_stream_id,
active_streams_.size(), unclaimed_pushed_streams_.size(),
error_code, debug_data));
MakeUnavailable();
@@ -2469,7 +2478,7 @@ void SpdySession::OnWindowUpdate(SpdyStreamId stream_id,
int delta_window_size) {
CHECK(in_io_loop_);
- net_log_.AddEvent(NetLogEventType::HTTP2_SESSION_RECEIVED_WINDOW_UPDATE_FRAME,
+ net_log_.AddEvent(NetLogEventType::HTTP2_SESSION_RECV_WINDOW_UPDATE,
base::Bind(&NetLogSpdyWindowUpdateFrameCallback, stream_id,
delta_window_size));
@@ -2832,7 +2841,7 @@ void SpdySession::SendWindowUpdateFrame(SpdyStreamId stream_id,
CHECK_EQ(stream_id, kSessionFlowControlStreamId);
}
- net_log_.AddEvent(NetLogEventType::HTTP2_SESSION_SENT_WINDOW_UPDATE_FRAME,
+ net_log_.AddEvent(NetLogEventType::HTTP2_SESSION_SEND_WINDOW_UPDATE,
base::Bind(&NetLogSpdyWindowUpdateFrameCallback, stream_id,
delta_window_size));
« no previous file with comments | « net/log/net_log_event_type_list.h ('k') | net/spdy/spdy_session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698