Commit 67ab34e3 authored by cfredric's avatar cfredric Committed by Chromium LUCI CQ

Record metrics to distinguish SameParty usage via HTTP vs. JS.

Bug: 1143756
Change-Id: Iedb06734ee09b9529f80952370f238df25110a83
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2611584
Commit-Queue: Chris Fredrickson <cfredric@chromium.org>
Reviewed-by: default avatarLily Chen <chlily@chromium.org>
Reviewed-by: default avatarMark Pearson <mpearson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#840610}
parent fdceab6e
......@@ -1008,6 +1008,11 @@ void CookieMonster::FilterCookiesWithOptions(
cookie_ptr->SourceScheme()));
}
if (cookie_ptr->IsSameParty()) {
UMA_HISTOGRAM_BOOLEAN("Cookie.SamePartyReadIncluded.IsHTTP",
!options.exclude_httponly());
}
included_cookies->push_back({*cookie_ptr, access_result});
}
}
......@@ -1220,6 +1225,10 @@ void CookieMonster::SetCanonicalCookie(std::unique_ptr<CanonicalCookie> cc,
DVLOG(net::cookie_util::kVlogSetCookies)
<< "SetCookie() key: " << key << " cc: " << cc->DebugString();
if (cc->IsSameParty()) {
UMA_HISTOGRAM_BOOLEAN("Cookie.SamePartySetIncluded.IsHTTP",
!options.exclude_httponly());
}
// Realize that we might be setting an expired cookie, and the only point
// was to delete the cookie which we've already done.
if (!already_expired) {
......
......@@ -8060,6 +8060,11 @@ Called by update_bad_message_reasons.py.-->
<int value="1" label="HTTPS"/>
</enum>
<enum name="BooleanHTTPVsJS">
<int value="0" label="JS"/>
<int value="1" label="HTTP"/>
</enum>
<enum name="BooleanIgnored">
<int value="0" label="Not ignored"/>
<int value="1" label="Ignored"/>
......@@ -398,6 +398,26 @@ reviews. Googlers can read more about this at go/gwsq-gerrit.
</summary>
</histogram>
<histogram name="Cookie.SamePartyReadIncluded.IsHTTP" enum="BooleanHTTPVsJS"
expires_after="2022-01-05">
<owner>cfredric@chromium.org</owner>
<owner>chlily@chromium.org</owner>
<summary>
This histogram records, for each cookie with the SameParty attribute that is
read, whether the access was over HTTP/HTTPS (as opposed to JS).
</summary>
</histogram>
<histogram name="Cookie.SamePartySetIncluded.IsHTTP" enum="BooleanHTTPVsJS"
expires_after="2022-01-05">
<owner>cfredric@chromium.org</owner>
<owner>chlily@chromium.org</owner>
<summary>
This histogram records, for each cookie that is set with the SameParty
attribute, whether the access was over HTTP/HTTPS (as opposed to JS).
</summary>
</histogram>
<histogram name="Cookie.SameSiteAttributeValue" enum="CookieSameSiteString"
expires_after="2021-11-01">
<owner>chlily@chromium.org</owner>
......
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