Commit 28647c83 authored by jkarlin@chromium.org's avatar jkarlin@chromium.org

Determine prevalence of cache-control: no-store in main frame resources.

BUG=383394

Review URL: https://codereview.chromium.org/329723006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276651 0039d316-1c4b-4281-b951-d872f2087c98
parent 819c90b5
...@@ -117,6 +117,15 @@ void RecordVaryHeaderHistogram(const net::HttpResponseInfo* response) { ...@@ -117,6 +117,15 @@ void RecordVaryHeaderHistogram(const net::HttpResponseInfo* response) {
UMA_HISTOGRAM_ENUMERATION("HttpCache.Vary", vary, VARY_MAX); 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
namespace net { namespace net {
...@@ -1027,6 +1036,7 @@ int HttpCache::Transaction::DoSuccessfulSendRequest() { ...@@ -1027,6 +1036,7 @@ int HttpCache::Transaction::DoSuccessfulSendRequest() {
} }
RecordVaryHeaderHistogram(new_response); RecordVaryHeaderHistogram(new_response);
RecordNoStoreHeaderHistogram(request_->load_flags, new_response);
if (new_response_->headers->response_code() == 416 && if (new_response_->headers->response_code() == 416 &&
(request_->method == "GET" || request_->method == "POST")) { (request_->method == "GET" || request_->method == "POST")) {
......
...@@ -13784,6 +13784,18 @@ Therefore, the affected-histogram name has to have at least one dot in it. ...@@ -13784,6 +13784,18 @@ Therefore, the affected-histogram name has to have at least one dot in it.
</summary> </summary>
</histogram> </histogram>
<histogram name="Net.MainFrameNoStore" enum="MainFrameStorable">
<owner>jkarlin@chromium.org</owner>
<summary>
The distribution of storable vs &quot;cache-control: no-store&quot;
main-frame resources.
Counted after response headers have completed and before the content has
completed. Redirects are counted. All HTTP cache transactions are counted,
not just those that require the network.
</summary>
</histogram>
<histogram name="Net.MTPR_GetProxyForUrl_Thread_Wait_Time" units="milliseconds"> <histogram name="Net.MTPR_GetProxyForUrl_Thread_Wait_Time" units="milliseconds">
<owner>Please list the metric's owners. Add more owner tags as needed.</owner> <owner>Please list the metric's owners. Add more owner tags as needed.</owner>
<summary> <summary>
...@@ -39031,6 +39043,11 @@ Therefore, the affected-histogram name has to have at least one dot in it. ...@@ -39031,6 +39043,11 @@ Therefore, the affected-histogram name has to have at least one dot in it.
<int value="5" label="OTHER_DEVELOPER">Other Dev</int> <int value="5" label="OTHER_DEVELOPER">Other Dev</int>
</enum> </enum>
<enum name="MainFrameStorable" type="int">
<int value="0" label="Storable"/>
<int value="1" label="cache-control: no-store"/>
</enum>
<enum name="ManagedUserPasswordChange" type="int"> <enum name="ManagedUserPasswordChange" type="int">
<int value="0" label="OK_MANAGER">Changed in manager session</int> <int value="0" label="OK_MANAGER">Changed in manager session</int>
<int value="1" label="OK_MANGED">Changed in supervised user session</int> <int value="1" label="OK_MANGED">Changed in supervised user session</int>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment