Chromium Code Reviews| Index: net/base/network_delegate.h |
| =================================================================== |
| --- net/base/network_delegate.h (revision 150909) |
| +++ net/base/network_delegate.h (working copy) |
| @@ -48,10 +48,12 @@ |
| }; |
| 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 @@ |
| 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 @@ |
| 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. |
| + // CACHE_WAIT_STATE_RESET indicates for a given URLRequest |
|
rvargas (doing something else)
2012/08/15 22:36:49
stale
tburkard
2012/08/15 23:00:47
Done.
|
| + // cancellation of any pending waits for this request. |
| + virtual void OnRequestWaitStateChange(const URLRequest& request, |
| + RequestWaitState state) = 0; |
| }; |
| } // namespace net |