diff options
author | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-10 22:28:21 +0000 |
---|---|---|
committer | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-10 22:28:21 +0000 |
commit | 9c235f046d073692051cafefac55e7f55eef4083 (patch) | |
tree | 29c34af7d1c9a5e280a1df3a04bd14d29ff47980 /net/base | |
parent | a3c400b9284179e1d846861d2494e2eaeddc6a48 (diff) | |
download | chromium_src-9c235f046d073692051cafefac55e7f55eef4083.zip chromium_src-9c235f046d073692051cafefac55e7f55eef4083.tar.gz chromium_src-9c235f046d073692051cafefac55e7f55eef4083.tar.bz2 |
Add a status message "Waiting for extension Foo..." when there's a request
blocked on an extension with a webrequest API event handler.
BUG=82618
TEST=no
Review URL: http://codereview.chromium.org/7523042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96226 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base')
-rw-r--r-- | net/base/load_states.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/net/base/load_states.h b/net/base/load_states.h index a3e5339..2f4911e 100644 --- a/net/base/load_states.h +++ b/net/base/load_states.h @@ -6,6 +6,8 @@ #define NET_BASE_LOAD_STATES_H__ #pragma once +#include "base/string16.h" + namespace net { // These states correspond to the lengthy periods of time that a resource load @@ -17,6 +19,13 @@ enum LoadState { // called Read yet). LOAD_STATE_IDLE, + // This state indicates that the URLRequest delegate has chosen to block this + // request before it was sent over the network. When in this state, the + // delegate should set a load state parameter on the URLRequest describing + // the nature of the delay (i.e. "Waiting for <description given by + // delegate>"). + LOAD_STATE_WAITING_FOR_DELEGATE, + // This state corresponds to a resource load that is blocked waiting for // access to a resource in the cache. If multiple requests are made for the // same resource, the first request will be responsible for writing (or @@ -69,6 +78,17 @@ enum LoadState { LOAD_STATE_READING_RESPONSE, }; +// Some states, like LOAD_STATE_WAITING_FOR_DELEGATE, are associated with extra +// data that describes more precisely what the delegate (for example) is doing. +// This class provides an easy way to hold a load state with an extra parameter. +struct LoadStateWithParam { + LoadState state; + string16 param; + LoadStateWithParam() {} + LoadStateWithParam(LoadState state, const string16& param) + : state(state), param(param) {} +}; + } // namespace net #endif // NET_BASE_LOAD_STATES_H__ |