Index: content/browser/loader/resource_dispatcher_host_impl.cc |
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc |
index 86d5e5fb1fff831c54dc35f149a56a55cb0979df..868f97ebb6d80db68fdc3e25c3db701c8294bd13 100644 |
--- a/content/browser/loader/resource_dispatcher_host_impl.cc |
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc |
@@ -317,6 +317,14 @@ webkit_blob::BlobStorageContext* GetBlobStorageContext( |
return filter->blob_storage_context()->context(); |
} |
+enum CacheStorable { |
+ // A "cache-control: no-store" header was found. |
+ CACHE_STORABLE_NO_STORE, |
+ // No "no-store" header was found. |
+ CACHE_STORABLE_STORE, |
+ CACHE_STORABLE_MAX |
+}; |
+ |
} // namespace |
// static |
@@ -769,6 +777,17 @@ void ResourceDispatcherHostImpl::DidFinishLoading(ResourceLoader* loader) { |
UMA_HISTOGRAM_COUNTS_100( |
"Net.CertificateTransparency.MainFrameValidSCTCount", num_valid_scts); |
} |
+ |
+ net::HttpResponseHeaders* response_headers = |
+ loader->request()->response_headers(); |
+ if (response_headers) { |
+ CacheStorable storable = |
+ response_headers->HasHeaderValue("cache-control", "no-store") |
+ ? CACHE_STORABLE_NO_STORE |
+ : CACHE_STORABLE_STORE; |
davidben
2014/06/11 16:28:01
This could also just be a boolean with UMA_HISTOGR
jkarlin
2014/06/11 16:50:06
True, that's simpler. Went with BOOLEAN.
|
+ UMA_HISTOGRAM_ENUMERATION( |
+ "Net.MainFrameStorable", storable, CACHE_STORABLE_MAX); |
+ } |
} else { |
if (info->GetResourceType() == ResourceType::IMAGE) { |
UMA_HISTOGRAM_SPARSE_SLOWLY( |