| Index: net/base/load_states.h
|
| diff --git a/net/base/load_states.h b/net/base/load_states.h
|
| index a3e5339fa5da231a9d3be7d99560a69bafc14370..2f4911ed67b9ad80fb7f957e6be2a198605000c4 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__
|
|
|