| 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 97fe95e10c79b08da35b84b9fcf8da9c6f75612f..7c9467e3424e00238d7c015fd0421a8f94871236 100644
|
| --- a/net/http/disk_cache_based_quic_server_info.h
|
| +++ b/net/http/disk_cache_based_quic_server_info.h
|
| @@ -41,6 +41,7 @@ class NET_EXPORT_PRIVATE DiskCacheBasedQuicServerInfo
|
|
|
| private:
|
| struct CacheOperationDataShim;
|
| +
|
| enum State {
|
| GET_BACKEND,
|
| GET_BACKEND_COMPLETE,
|
| @@ -57,6 +58,34 @@ 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_NUM_OF_API_CALLS = 6,
|
| + };
|
| +
|
| + // 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;
|
| @@ -86,6 +115,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_;
|
|
|