| Index: net/http/disk_cache_based_quic_server_info.h
|
| diff --git a/net/http/disk_cache_based_quic_server_info.h b/net/http/disk_cache_based_quic_server_info.h
|
| index 0ca7538815944a08dc110edbc0841e8a56b6c6f1..4fa17af352212046351b9157de3f1907f2beb895 100644
|
| --- a/net/http/disk_cache_based_quic_server_info.h
|
| +++ b/net/http/disk_cache_based_quic_server_info.h
|
| @@ -42,6 +42,7 @@ class NET_EXPORT_PRIVATE DiskCacheBasedQuicServerInfo
|
|
|
| private:
|
| struct CacheOperationDataShim;
|
| +
|
| enum State {
|
| GET_BACKEND,
|
| GET_BACKEND_COMPLETE,
|
| @@ -58,6 +59,35 @@ class NET_EXPORT_PRIVATE DiskCacheBasedQuicServerInfo
|
| NONE,
|
| };
|
|
|
| + // Enum to track number of times data read/parse/write API calls of
|
| + // QuicServerInfo to and from disk cache is called.
|
| + enum QuicServerInfoAPICall {
|
| + QUIC_SERVER_INFO_START = 0,
|
| + QUIC_SERVER_INFO_WAIT_FOR_DATA_READY = 1,
|
| + QUIC_SERVER_INFO_PARSE = 2,
|
| + QUIC_SERVER_INFO_WAIT_FOR_DATA_READY_CANCEL = 3,
|
| + QUIC_SERVER_INFO_READY_TO_PERSIST = 4,
|
| + QUIC_SERVER_INFO_PERSIST = 5,
|
| + QUIC_SERVER_INFO_EXTERNAL_CACHE_HIT = 6,
|
| + QUIC_SERVER_INFO_NUM_OF_API_CALLS = 7,
|
| + };
|
| +
|
| + // Enum to track failure reasons to read/load/write of QuicServerInfo to
|
| + // and from disk cache.
|
| + enum FailureReason {
|
| + WAIT_FOR_DATA_READY_INVALID_ARGUMENT_FAILURE = 0,
|
| + GET_BACKEND_FAILURE = 1,
|
| + OPEN_FAILURE = 2,
|
| + CREATE_OR_OPEN_FAILURE = 3,
|
| + PARSE_NO_DATA_FAILURE = 4,
|
| + PARSE_FAILURE = 5,
|
| + READ_FAILURE = 6,
|
| + READY_TO_PERSIST_FAILURE = 7,
|
| + PERSIST_NO_BACKEND_FAILURE = 8,
|
| + WRITE_FAILURE = 9,
|
| + NUM_OF_FAILURES = 10,
|
| + };
|
| +
|
| ~DiskCacheBasedQuicServerInfo() override;
|
|
|
| std::string key() const;
|
| @@ -87,6 +117,14 @@ class NET_EXPORT_PRIVATE DiskCacheBasedQuicServerInfo
|
| // DoSetDone is the terminal state of the write operation.
|
| int DoSetDone();
|
|
|
| + // Tracks in a histogram the number of times data read/parse/write API calls
|
| + // of QuicServerInfo to and from disk cache is called.
|
| + void RecordQuicServerInfoStatus(QuicServerInfoAPICall call);
|
| +
|
| + // Tracks in a histogram the failure reasons to read/load/write of
|
| + // QuicServerInfo to and from disk cache.
|
| + void RecordQuicServerInfoFailure(FailureReason failure);
|
| +
|
| CacheOperationDataShim* data_shim_; // Owned by |io_callback_|.
|
| CompletionCallback io_callback_;
|
| State state_;
|
|
|