Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(353)

Unified Diff: net/http/http_cache_transaction.h

Issue 2113603003: Exposing CacheEntryStatus (former TransactionPattern) via UrlRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/http/http_cache_transaction.cc » ('j') | net/http/http_response_info.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..20ff156c679ae8d7473bc40486f7abd77e06de27 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,13 @@ 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 UpdateTransactionPattern(
+ HttpResponseInfo::CacheInfo new_transaction_pattern);
jkarlin 2016/06/30 19:01:12 newline after this line to give the comment space
jkarlin 2016/06/30 19:01:12 This function needs to be renamed if it's no longe
jamartin 2016/07/04 17:12:26 Done.
jamartin 2016/07/04 17:12:26 Done.
+ // Sets the response cache_info to the current transaction pattern.
+ void SyncTransactionPattern();
jkarlin 2016/06/30 19:01:12 Replace "Transaction" to reflect the name of the n
jamartin 2016/07/04 17:12:26 Done.
void RecordHistograms();
// Called to signal completion of asynchronous IO.
@@ -479,7 +468,7 @@ class HttpCache::Transaction : public HttpTransaction {
CompletionCallback io_callback_;
// Members used to track data for histograms.
- TransactionPattern transaction_pattern_;
+ HttpResponseInfo::CacheInfo transaction_pattern_;
jkarlin 2016/06/30 19:01:12 Rename transaction_pattern_
jamartin 2016/07/04 17:12:26 Done.
ValidationCause validation_cause_;
base::TimeTicks entry_lock_waiting_since_;
base::TimeTicks first_cache_access_since_;
« no previous file with comments | « no previous file | net/http/http_cache_transaction.cc » ('j') | net/http/http_response_info.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698