| Index: net/http/http_cache_transaction.h
|
| diff --git a/net/http/http_cache_transaction.h b/net/http/http_cache_transaction.h
|
| index 6ad51ab9080d903522df5ad3becf1cd0ea457fc0..b142c0adc63aa273ab3ac50b5b8fb7d26078c70d 100644
|
| --- a/net/http/http_cache_transaction.h
|
| +++ b/net/http/http_cache_transaction.h
|
| @@ -229,23 +229,6 @@ class HttpCache::Transaction : public HttpTransaction {
|
| STATE_CACHE_WRITE_TRUNCATED_RESPONSE_COMPLETE
|
| };
|
|
|
| - // Used for categorizing transactions for reporting in histograms. Patterns
|
| - // cover relatively common use cases being measured and considered for
|
| - // optimization. Many use cases that are more complex or uncommon are binned
|
| - // as PATTERN_NOT_COVERED, and details are not reported.
|
| - // NOTE: This enumeration is used in histograms, so please do not add entries
|
| - // in the middle.
|
| - enum TransactionPattern {
|
| - PATTERN_UNDEFINED,
|
| - PATTERN_NOT_COVERED,
|
| - PATTERN_ENTRY_NOT_CACHED,
|
| - PATTERN_ENTRY_USED,
|
| - PATTERN_ENTRY_VALIDATED,
|
| - PATTERN_ENTRY_UPDATED,
|
| - PATTERN_ENTRY_CANT_CONDITIONALIZE,
|
| - 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.
|
| @@ -432,7 +415,14 @@ class HttpCache::Transaction : public HttpTransaction {
|
| // data is considered for the result.
|
| bool CanResume(bool has_data);
|
|
|
| - void UpdateTransactionPattern(TransactionPattern new_transaction_pattern);
|
| + // Setter for response_.
|
| + void set_response(const HttpResponseInfo& new_response);
|
| +
|
| + void UpdateCacheEntryStatus(
|
| + HttpResponseInfo::CacheEntryStatus new_cache_entry_status);
|
| +
|
| + // Sets the response.cache_entry_status to the current cache_entry_status_.
|
| + void SyncCacheEntryStatusToResponse();
|
| void RecordHistograms();
|
|
|
| // Called to signal completion of asynchronous IO.
|
| @@ -479,7 +469,11 @@ class HttpCache::Transaction : public HttpTransaction {
|
| CompletionCallback io_callback_;
|
|
|
| // Members used to track data for histograms.
|
| - TransactionPattern transaction_pattern_;
|
| + // This cache_entry_status_ takes precedence over
|
| + // response_.cache_entry_status. In fact, response_.cache_entry_status must be
|
| + // kept in sync with cache_entry_status_ (via set_response and
|
| + // UpdateCacheEntryStatus).
|
| + HttpResponseInfo::CacheEntryStatus cache_entry_status_;
|
| ValidationCause validation_cause_;
|
| base::TimeTicks entry_lock_waiting_since_;
|
| base::TimeTicks first_cache_access_since_;
|
|
|