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

Unified Diff: net/spdy/spdy_session.cc

Issue 8824005: SPDY PING - log the type of PING if it is received (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years 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/base/net_log_event_type_list.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session.cc
===================================================================
--- net/spdy/spdy_session.cc (revision 112817)
+++ net/spdy/spdy_session.cc (working copy)
@@ -175,17 +175,21 @@
class NetLogSpdyPingParameter : public NetLog::EventParameters {
public:
- explicit NetLogSpdyPingParameter(uint32 unique_id) : unique_id_(unique_id) {}
+ explicit NetLogSpdyPingParameter(uint32 unique_id, const std::string& type)
+ : unique_id_(unique_id),
+ type_(type) {}
virtual Value* ToValue() const {
DictionaryValue* dict = new DictionaryValue();
dict->SetInteger("unique_id", unique_id_);
+ dict->SetString("type", type_);
return dict;
}
private:
~NetLogSpdyPingParameter() {}
const uint32 unique_id_;
+ const std::string type_;
DISALLOW_COPY_AND_ASSIGN(NetLogSpdyPingParameter);
};
@@ -1382,7 +1386,8 @@
void SpdySession::OnPing(const spdy::SpdyPingControlFrame& frame) {
net_log_.AddEvent(
NetLog::TYPE_SPDY_SESSION_PING,
- make_scoped_refptr(new NetLogSpdyPingParameter(frame.unique_id())));
+ make_scoped_refptr(
+ new NetLogSpdyPingParameter(frame.unique_id(), "received")));
// Send response to a PING from server.
if (frame.unique_id() % 2 == 0) {
@@ -1593,7 +1598,7 @@
if (net_log().IsLoggingAllEvents()) {
net_log().AddEvent(
NetLog::TYPE_SPDY_SESSION_PING,
- make_scoped_refptr(new NetLogSpdyPingParameter(next_ping_id_)));
+ make_scoped_refptr(new NetLogSpdyPingParameter(next_ping_id_, "sent")));
}
if (unique_id % 2 != 0) {
next_ping_id_ += 2;
« no previous file with comments | « net/base/net_log_event_type_list.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698