| Index: net/http/http_cache_transaction.h
|
| diff --git a/net/http/http_cache_transaction.h b/net/http/http_cache_transaction.h
|
| index 5b1dc6c5eaa9a7b747aa913a9065ec797038cd2b..e27a75874b404513bc3446b20d53c0295285f4fa 100644
|
| --- a/net/http/http_cache_transaction.h
|
| +++ b/net/http/http_cache_transaction.h
|
| @@ -174,6 +174,19 @@ class HttpCache::Transaction : public HttpTransaction {
|
| STATE_CACHE_WRITE_DATA_COMPLETE
|
| };
|
|
|
| + // Used for reporting times in histograms. The dispositions cover relatively
|
| + // common simple cases for cache resource requests, but are not intended to be
|
| + // exhaustive; many tricky special cases are all binned together as
|
| + // DISPOSITION_DO_NOT_RECORD.
|
| + enum Disposition {
|
| + DISPOSITION_UNDEFINED,
|
| + DISPOSITION_DO_NOT_RECORD,
|
| + DISPOSITION_NO_ENTRY,
|
| + DISPOSITION_ENTRY_UNCONDITIONALLY_USED,
|
| + DISPOSITION_ENTRY_VALIDATED_304,
|
| + DISPOSITION_ENTRY_VALIDATED_200,
|
| + };
|
| +
|
| // This is a helper function used to trigger a completion callback. It may
|
| // only be called if callback_ is non-null.
|
| void DoCallback(int rv);
|
| @@ -334,6 +347,12 @@ class HttpCache::Transaction : public HttpTransaction {
|
| // Called to signal completion of asynchronous IO.
|
| void OnIOComplete(int result);
|
|
|
| + // Called when we've determined the disposition of this request.
|
| + void MaybeUpdateDisposition(Disposition disposition);
|
| +
|
| + // Called on completion of a request to record performance.
|
| + void RecordHistograms(int resource_size);
|
| +
|
| State next_state_;
|
| const HttpRequestInfo* request_;
|
| BoundNetLog net_log_;
|
| @@ -344,7 +363,6 @@ class HttpCache::Transaction : public HttpTransaction {
|
| ValidationHeaders external_validation_;
|
| base::WeakPtr<HttpCache> cache_;
|
| HttpCache::ActiveEntry* entry_;
|
| - base::TimeTicks entry_lock_waiting_since_;
|
| HttpCache::ActiveEntry* new_entry_;
|
| scoped_ptr<HttpTransaction> network_trans_;
|
| CompletionCallback callback_; // Consumer's callback.
|
| @@ -371,6 +389,12 @@ class HttpCache::Transaction : public HttpTransaction {
|
| uint64 final_upload_progress_;
|
| base::WeakPtrFactory<Transaction> weak_factory_;
|
| CompletionCallback io_callback_;
|
| +
|
| + // Members used to track data for histograms.
|
| + Disposition disposition_;
|
| + base::TimeTicks entry_lock_waiting_since_;
|
| + base::TimeTicks open_entry_since_;
|
| + base::TimeTicks started_reading_since_;
|
| };
|
|
|
| } // namespace net
|
|
|