Commit 019d34e0 authored by Lily Chen's avatar Lily Chen Committed by Chromium LUCI CQ

Remove Android.WebView.CookieManager.SameSite* histograms

These are no longer needed.

Bug: 1165012
Change-Id: I4c0c9bdf824359bc55686b67a293cf8203af6512
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2627694Reviewed-by: default avatarRichard Coles <torne@chromium.org>
Reviewed-by: default avatarIlya Sherman <isherman@chromium.org>
Commit-Queue: Lily Chen <chlily@chromium.org>
Cr-Commit-Position: refs/heads/master@{#843261}
parent 9127573b
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#include "base/logging.h" #include "base/logging.h"
#include "base/memory/ref_counted.h" #include "base/memory/ref_counted.h"
#include "base/metrics/histogram_functions.h" #include "base/metrics/histogram_functions.h"
#include "base/metrics/histogram_macros.h"
#include "base/no_destructor.h" #include "base/no_destructor.h"
#include "base/optional.h" #include "base/optional.h"
#include "base/path_service.h" #include "base/path_service.h"
...@@ -96,21 +95,12 @@ enum class SecureCookieAction { ...@@ -96,21 +95,12 @@ enum class SecureCookieAction {
kMaxValue = kDisallowedAndroidR, kMaxValue = kDisallowedAndroidR,
}; };
// Since this function parses the set-cookie line into a ParsedCookie, it is GURL MaybeFixUpSchemeForSecureCookie(const GURL& host,
// convenient to hook into here to get the SameSite value from the parsed
// cookie for histogramming.
GURL MaybeFixUpSchemeForSecureCookieAndGetSameSite(
const GURL& host,
const std::string& value, const std::string& value,
bool workaround_http_secure_cookies, bool workaround_http_secure_cookies,
net::CookieSameSiteString* samesite_out,
bool* should_allow_cookie) { bool* should_allow_cookie) {
net::ParsedCookie parsed_cookie(value); net::ParsedCookie parsed_cookie(value);
// Grab the SameSite value for histogramming.
DCHECK(samesite_out);
parsed_cookie.SameSite(samesite_out);
*should_allow_cookie = true; *should_allow_cookie = true;
// Log message for catching strict secure cookies related bugs. // Log message for catching strict secure cookies related bugs.
...@@ -471,14 +461,9 @@ void CookieManager::SetCookieHelper(const GURL& host, ...@@ -471,14 +461,9 @@ void CookieManager::SetCookieHelper(const GURL& host,
base::OnceCallback<void(bool)> callback) { base::OnceCallback<void(bool)> callback) {
DCHECK(cookie_store_task_runner_->RunsTasksInCurrentSequence()); DCHECK(cookie_store_task_runner_->RunsTasksInCurrentSequence());
net::CookieSameSiteString samesite = net::CookieSameSiteString::kUnspecified;
bool should_allow_cookie = true; bool should_allow_cookie = true;
const GURL& new_host = MaybeFixUpSchemeForSecureCookieAndGetSameSite( const GURL& new_host = MaybeFixUpSchemeForSecureCookie(
host, value, workaround_http_secure_cookies_, &samesite, host, value, workaround_http_secure_cookies_, &should_allow_cookie);
&should_allow_cookie);
UMA_HISTOGRAM_ENUMERATION(
"Android.WebView.CookieManager.SameSiteAttributeValue", samesite);
net::CookieInclusionStatus status; net::CookieInclusionStatus status;
std::unique_ptr<net::CanonicalCookie> cc( std::unique_ptr<net::CanonicalCookie> cc(
...@@ -490,11 +475,6 @@ void CookieManager::SetCookieHelper(const GURL& host, ...@@ -490,11 +475,6 @@ void CookieManager::SetCookieHelper(const GURL& host,
return; return;
} }
if (cc->SameSite() == net::CookieSameSite::NO_RESTRICTION) {
UMA_HISTOGRAM_BOOLEAN("Android.WebView.CookieManager.SameSiteNoneIsSecure",
cc->IsSecure());
}
// Note: CookieStore and network::CookieManager both accept a // Note: CookieStore and network::CookieManager both accept a
// CookieAccessResult callback. WebView only cares about boolean success, // CookieAccessResult callback. WebView only cares about boolean success,
// which is why we use |AdaptCookieAccessResultToBool|. This is temporary // which is why we use |AdaptCookieAccessResultToBool|. This is temporary
......
...@@ -2310,6 +2310,9 @@ reviews. Googlers can read more about this at go/gwsq-gerrit. ...@@ -2310,6 +2310,9 @@ reviews. Googlers can read more about this at go/gwsq-gerrit.
<histogram name="Android.WebView.CookieManager.SameSiteAttributeValue" <histogram name="Android.WebView.CookieManager.SameSiteAttributeValue"
enum="CookieSameSiteString" expires_after="M90"> enum="CookieSameSiteString" expires_after="M90">
<obsolete>
Removed Jan 2021 for cleanup (no longer needed): https://crbug.com/1165012
</obsolete>
<owner>chlily@chromium.org</owner> <owner>chlily@chromium.org</owner>
<owner>torne@chromium.org</owner> <owner>torne@chromium.org</owner>
<summary> <summary>
...@@ -2322,6 +2325,9 @@ reviews. Googlers can read more about this at go/gwsq-gerrit. ...@@ -2322,6 +2325,9 @@ reviews. Googlers can read more about this at go/gwsq-gerrit.
<histogram name="Android.WebView.CookieManager.SameSiteNoneIsSecure" <histogram name="Android.WebView.CookieManager.SameSiteNoneIsSecure"
enum="Boolean" expires_after="M90"> enum="Boolean" expires_after="M90">
<obsolete>
Removed Jan 2021 for cleanup (no longer needed): https://crbug.com/1165012
</obsolete>
<owner>chlily@chromium.org</owner> <owner>chlily@chromium.org</owner>
<owner>torne@chromium.org</owner> <owner>torne@chromium.org</owner>
<summary> <summary>
......
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