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

Unified Diff: net/http/http_cache_transaction.cc

Issue 329723006: Determine prevalence of cache-control: no-store in main frame resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactor name Created 6 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 | tools/metrics/histograms/histograms.xml » ('j') | tools/metrics/histograms/histograms.xml » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_cache_transaction.cc
diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc
index 648199063a7e0f032f885a0467296a01ece8b035..efb21e1df170d8fc01d512acc3c857e71452d9be 100644
--- a/net/http/http_cache_transaction.cc
+++ b/net/http/http_cache_transaction.cc
@@ -117,6 +117,15 @@ void RecordVaryHeaderHistogram(const net::HttpResponseInfo* response) {
UMA_HISTOGRAM_ENUMERATION("HttpCache.Vary", vary, VARY_MAX);
}
+void RecordNoStoreHeaderHistogram(int load_flags,
+ const net::HttpResponseInfo* response) {
+ if (load_flags & net::LOAD_MAIN_FRAME) {
+ UMA_HISTOGRAM_BOOLEAN(
+ "Net.MainFrameNoStore",
+ response->headers->HasHeaderValue("cache-control", "no-store"));
+ }
+}
+
} // namespace
namespace net {
@@ -1027,6 +1036,7 @@ int HttpCache::Transaction::DoSuccessfulSendRequest() {
}
RecordVaryHeaderHistogram(new_response);
+ RecordNoStoreHeaderHistogram(request_->load_flags, new_response);
if (new_response_->headers->response_code() == 416 &&
(request_->method == "GET" || request_->method == "POST")) {
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | tools/metrics/histograms/histograms.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698