| Index: net/http/http_response_info.h
|
| diff --git a/net/http/http_response_info.h b/net/http/http_response_info.h
|
| index a67e4ecd3f16f6b2c1b4dfb4e479070f40596fec..046774250f62b310cab2e7f9b34386b7812b186a 100644
|
| --- a/net/http/http_response_info.h
|
| +++ b/net/http/http_response_info.h
|
| @@ -46,6 +46,34 @@ class NET_EXPORT HttpResponseInfo {
|
| NUM_OF_CONNECTION_INFOS,
|
| };
|
|
|
| + // Used for categorizing transactions for reporting in histograms.
|
| + // CacheEntryStatus covers relatively common use cases being measured and
|
| + // considered for optimization. Many use cases that are more complex or
|
| + // uncommon are binned as OTHER, and details are not reported.
|
| + // NOTE: This enumeration is used in histograms, so please do not add entries
|
| + // in the middle.
|
| + enum CacheEntryStatus {
|
| + ENTRY_UNDEFINED,
|
| + // Complex or uncommon case. E.g., auth (401), partial responses (206), ...
|
| + ENTRY_OTHER,
|
| + // The response was not in the cache. Implies !was_cached &&
|
| + // network_accessed.
|
| + ENTRY_NOT_IN_CACHE,
|
| + // The response was served from the cache and no validation was needed.
|
| + // Implies was_cached && !network_accessed.
|
| + ENTRY_USED,
|
| + // The response was validated and served from the cache. Implies was_cached
|
| + // && network_accessed.
|
| + ENTRY_VALIDATED,
|
| + // There was a stale entry in the cache that was updated. Implies
|
| + // !was_cached && network_accessed.
|
| + ENTRY_UPDATED,
|
| + // The HTTP request didn't allow a conditional request. Implies !was_cached
|
| + // && network_accessed.
|
| + ENTRY_CANT_CONDITIONALIZE,
|
| + ENTRY_MAX,
|
| + };
|
| +
|
| HttpResponseInfo();
|
| HttpResponseInfo(const HttpResponseInfo& rhs);
|
| ~HttpResponseInfo();
|
| @@ -77,6 +105,9 @@ class NET_EXPORT HttpResponseInfo {
|
| // value even if the request fails.
|
| bool was_cached;
|
|
|
| + // How this response was handled by the HTTP cache.
|
| + CacheEntryStatus cache_entry_status;
|
| +
|
| // True if the request was fetched from cache rather than the network
|
| // because of a LOAD_FROM_CACHE_IF_OFFLINE flag when the system
|
| // was unable to contact the server.
|
|
|