Chromium Code Reviews| Index: net/http/http_cache_transaction.h |
| diff --git a/net/http/http_cache_transaction.h b/net/http/http_cache_transaction.h |
| index 0c9b11253543ac44c65986bdd743c45870c03972..8e26337820396e3fd9f1825012df736f2c159dcd 100644 |
| --- a/net/http/http_cache_transaction.h |
| +++ b/net/http/http_cache_transaction.h |
| @@ -246,6 +246,18 @@ class HttpCache::Transaction : public HttpTransaction { |
| PATTERN_MAX, |
| }; |
| + // Used for categorizing validation triggers in histograms. |
| + // NOTE: This enumeration is used in histograms, so please do not add entries |
| + // in the middle. |
| + enum ValidationCause { |
|
gavinp
2016/05/12 15:02:02
Could we use an enum class here?
jkarlin
2016/05/13 15:06:51
We could, but we'd still have to static_cast the h
|
| + VALIDATION_CAUSE_UNDEFINED, |
| + VALIDATION_CAUSE_VARY_MISMATCH, |
| + VALIDATION_CAUSE_VALIDATE_FLAG, |
| + VALIDATION_CAUSE_STALE, |
| + VALIDATION_CAUSE_ZERO_FRESHNESS, |
| + VALIDATION_CAUSE_MAX |
| + }; |
| + |
| // Runs the state transition loop. Resets and calls |callback_| on exit, |
| // unless the return value is ERR_IO_PENDING. |
| int DoLoop(int result); |
| @@ -468,6 +480,7 @@ class HttpCache::Transaction : public HttpTransaction { |
| // Members used to track data for histograms. |
| TransactionPattern transaction_pattern_; |
| + ValidationCause validation_cause_; |
| base::TimeTicks entry_lock_waiting_since_; |
| base::TimeTicks first_cache_access_since_; |
| base::TimeTicks send_request_since_; |