diff options
author | tburkard@chromium.org <tburkard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-20 22:13:01 +0000 |
---|---|---|
committer | tburkard@chromium.org <tburkard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-20 22:13:01 +0000 |
commit | a9e0d14153a96db052928a6d7e6eb640bc61e375 (patch) | |
tree | ac9780bc900d06be1ac04d49acae46805fc68722 /net/base/network_delegate.h | |
parent | 97e92e516593d34b5be62df411b950d829d4a338 (diff) | |
download | chromium_src-a9e0d14153a96db052928a6d7e6eb640bc61e375.zip chromium_src-a9e0d14153a96db052928a6d7e6eb640bc61e375.tar.gz chromium_src-a9e0d14153a96db052928a6d7e6eb640bc61e375.tar.bz2 |
Add histograms for network activity, and total/cumulative
histograms for cache/network activity.
R=rvargas@chromium.org, mmenke@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10834313
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152398 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/network_delegate.h')
-rw-r--r-- | net/base/network_delegate.h | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/net/base/network_delegate.h b/net/base/network_delegate.h index f3bc758..ed57197 100644 --- a/net/base/network_delegate.h +++ b/net/base/network_delegate.h @@ -48,10 +48,12 @@ class NetworkDelegate : public base::NonThreadSafe { }; typedef base::Callback<void(AuthRequiredResponse)> AuthCallback; - enum CacheWaitState { - CACHE_WAIT_STATE_START, - CACHE_WAIT_STATE_FINISH, - CACHE_WAIT_STATE_RESET + enum RequestWaitState { + REQUEST_WAIT_STATE_CACHE_START, + REQUEST_WAIT_STATE_CACHE_FINISH, + REQUEST_WAIT_STATE_NETWORK_START, + REQUEST_WAIT_STATE_NETWORK_FINISH, + REQUEST_WAIT_STATE_RESET }; virtual ~NetworkDelegate() {} @@ -96,8 +98,8 @@ class NetworkDelegate : public base::NonThreadSafe { int NotifyBeforeSocketStreamConnect(SocketStream* socket, const CompletionCallback& callback); - void NotifyCacheWaitStateChange(const URLRequest& request, - CacheWaitState state); + void NotifyRequestWaitStateChange(const URLRequest& request, + RequestWaitState state); private: // This is the interface for subclasses of NetworkDelegate to implement. These @@ -225,15 +227,11 @@ class NetworkDelegate : public base::NonThreadSafe { SocketStream* socket, const CompletionCallback& callback) = 0; // Called when the completion of a URLRequest is blocking on a cache - // transaction (CACHE_WAIT_STATE_START), or when a URLRequest is no longer - // blocked on a cache transaction (CACHE_WAIT_STATE_FINISH), or when a - // URLRequest is reset (CACHE_WAIT_STATE_RESET), indicating - // cancellation of any pending cache waits for this request. Notice that - // START can be called several times for the same request. It is the - // responsibility of the delegate to keep track of the number of outstanding - // cache transactions. - virtual void OnCacheWaitStateChange(const URLRequest& request, - CacheWaitState state) = 0; + // action or a network action, or when that is no longer the case. + // REQUEST_WAIT_STATE_RESET indicates for a given URLRequest + // cancellation of any pending waits for this request. + virtual void OnRequestWaitStateChange(const URLRequest& request, + RequestWaitState state) = 0; }; } // namespace net |