Add histogram and CookieInclusionStatus warning for crbug.com/1166211

This adds a histogram and warning status for cookies which are excluded
solely due to the fix for crbug.com/1166211, to provide debugging aid
and measure impact on web compatibility.

Bug: 1166211
Change-Id: I5f21da2b1c07df7e543bc3636db95698764fd08f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2705880
Reviewed-by: Maksim Orlovich <[email protected]>
Reviewed-by: Steven Holte <[email protected]>
Commit-Queue: Lily Chen <[email protected]>
Cr-Commit-Position: refs/heads/master@{#856478}
diff --git a/net/cookies/cookie_inclusion_status.h b/net/cookies/cookie_inclusion_status.h
index d46d01f..3247c62 100644
--- a/net/cookies/cookie_inclusion_status.h
+++ b/net/cookies/cookie_inclusion_status.h
@@ -169,6 +169,13 @@
     // contexts, for cookies that are 'SameParty; SameSite=Lax'.)
     WARN_SAMEPARTY_INCLUSION_OVERRULED_SAMESITE = 11,
 
+    // The cookie was SameSite=Lax (or unspecified-treated-as-lax) and was
+    // excluded due to the fix for crbug.com/1166211, i.e. it was accessed by an
+    // HTTP request which was not a main frame navigation, whose initiator was
+    // cross-site and whose site-for-cookies was same-site with the request URL.
+    // TODO(crbug.com/1166211): Remove when no longer needed.
+    WARN_SAMESITE_LAX_EXCLUDED_AFTER_BUGFIX_1166211 = 12,
+
     // This should be kept last.
     NUM_WARNING_REASONS
   };