Chromium Code Reviews| Index: net/http/http_response_info.h |
| diff --git a/net/http/http_response_info.h b/net/http/http_response_info.h |
| index 2dce1a1de07c9577c835cfcb8b2f2ca7bbf3e5c9..2e02704fb1e87740fbea2e83295419be77d76169 100644 |
| --- a/net/http/http_response_info.h |
| +++ b/net/http/http_response_info.h |
| @@ -44,6 +44,30 @@ class NET_EXPORT HttpResponseInfo { |
| NUM_OF_CONNECTION_INFOS, |
| }; |
| + // Used for categorizing transactions for reporting in histograms. |
| + // CacheInfo covers relatively common use cases being measured and considered |
| + // for optimization. Many use cases that are more complex or uncommon are |
| + // binned as NOT_COVERED, and details are not reported. |
| + // NOTE: This enumeration is used in histograms, so please do not add entries |
| + // in the middle. |
| + enum CacheInfo { |
|
jkarlin
2016/06/30 19:01:12
CacheInfo is vague. How about CacheEntryStatus?
jamartin
2016/07/04 17:12:26
Done.
|
| + UNDEFINED, |
| + // Complex or uncommon case. |
| + NOT_COVERED, |
| + // The response was not in the cache. |
| + ENTRY_NOT_CACHED, |
| + // The response was served from the cache. Implies was_cached. |
| + ENTRY_USED, |
| + // The response was validated and served from the cache. Implies was_cached |
| + // and network_accessed. |
| + ENTRY_VALIDATED, |
| + // There was a stale entry in the cache that was updated. |
| + ENTRY_UPDATED, |
| + // The HTTP request didn't allow a conditional request. |
| + ENTRY_CANT_CONDITIONALIZE, |
| + MAX, |
| + }; |
| + |
| HttpResponseInfo(); |
| HttpResponseInfo(const HttpResponseInfo& rhs); |
| ~HttpResponseInfo(); |
| @@ -75,6 +99,9 @@ class NET_EXPORT HttpResponseInfo { |
| // value even if the request fails. |
| bool was_cached; |
| + // How this response was handled by the http_cache. |
|
jkarlin
2016/06/30 19:01:12
s/http_cache/HTTP cache/
jamartin
2016/07/04 17:12:26
Done.
|
| + CacheInfo cache_info; |
|
jkarlin
2016/06/30 19:01:12
similarly, prefer cache_entry_status
jamartin
2016/07/04 17:12:26
Done.
|
| + |
| // 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. |