diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-15 00:21:00 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-15 00:21:00 +0000 |
commit | 47b3b473b847a92005065094524a33bbdb8d134f (patch) | |
tree | 00e7f794226f763f86ed50d5a29a0271a5f348e3 /chrome/browser/net/passive_log_collector.h | |
parent | a39c2d1698c0a313ae5924342854a2038a4de2e9 (diff) | |
download | chromium_src-47b3b473b847a92005065094524a33bbdb8d134f.zip chromium_src-47b3b473b847a92005065094524a33bbdb8d134f.tar.gz chromium_src-47b3b473b847a92005065094524a33bbdb8d134f.tar.bz2 |
Support SpdySession as a new NetLog source type. Start logging some more SPDY control frames.
BUG=43237
Review URL: http://codereview.chromium.org/2102003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47342 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net/passive_log_collector.h')
-rw-r--r-- | chrome/browser/net/passive_log_collector.h | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/chrome/browser/net/passive_log_collector.h b/chrome/browser/net/passive_log_collector.h index e67b27b..207b45b 100644 --- a/chrome/browser/net/passive_log_collector.h +++ b/chrome/browser/net/passive_log_collector.h @@ -96,10 +96,6 @@ class PassiveLogCollector : public ChromeNetLog::Observer { ACTION_MOVE_TO_GRAVEYARD, }; - // Updates |out_info| with the information from |entry|. Returns an action - // to perform for this map entry on completion. - virtual Action DoAddEntry(const Entry& entry, RequestInfo* out_info) = 0; - // Finds a request, either in the live entries or the graveyard and returns // it. RequestInfo* GetRequestInfo(uint32 id); @@ -112,6 +108,10 @@ class PassiveLogCollector : public ChromeNetLog::Observer { private: typedef base::hash_map<uint32, RequestInfo> SourceIDToInfoMap; + // Updates |out_info| with the information from |entry|. Returns an action + // to perform for this map entry on completion. + virtual Action DoAddEntry(const Entry& entry, RequestInfo* out_info) = 0; + void RemoveFromLiveRequests(uint32 source_id); void InsertIntoGraveyard(const RequestInfo& info); @@ -197,6 +197,20 @@ class PassiveLogCollector : public ChromeNetLog::Observer { DISALLOW_COPY_AND_ASSIGN(InitProxyResolverTracker); }; + // Tracks the log entries for the last seen SOURCE_SPDY_SESSION. + class SpdySessionTracker : public RequestTrackerBase { + public: + static const size_t kMaxGraveyardSize; + + SpdySessionTracker(); + + protected: + virtual Action DoAddEntry(const Entry& entry, RequestInfo* out_info); + + private: + DISALLOW_COPY_AND_ASSIGN(SpdySessionTracker); + }; + PassiveLogCollector(); ~PassiveLogCollector(); @@ -222,6 +236,10 @@ class PassiveLogCollector : public ChromeNetLog::Observer { return &init_proxy_resolver_tracker_; } + SpdySessionTracker* spdy_session_tracker() { + return &spdy_session_tracker_; + } + // Fills |out| with the full list of events that have been passively // captured. The list is ordered by capture time. void GetAllCapturedEvents(EntryList* out) const; @@ -235,6 +253,7 @@ class PassiveLogCollector : public ChromeNetLog::Observer { RequestTracker url_request_tracker_; RequestTracker socket_stream_tracker_; InitProxyResolverTracker init_proxy_resolver_tracker_; + SpdySessionTracker spdy_session_tracker_; // The count of how many events have flowed through this log. Used to set the // "order" field on captured events. |