Commit fa7aed86 authored by Christian Dullweber's avatar Christian Dullweber Committed by Commit Bot

Remove CookieSettingsBase DCHECK

Most requests/callers have a NetworkIsolationKey to provide the
top_level_origin but a few are still missing.
Remove the DCHECK to avoid crashes in Canary.
Callers that don't supply a top_level_origin will fall back to
site_for_cookies, which is more restrictive.

Bug: 1015548
Change-Id: Ic2b7e08e56427f1e4a6600cd813948c2d462b396
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1868991
Commit-Queue: Christian Dullweber <dullweber@chromium.org>
Commit-Queue: Balazs Engedy <engedy@chromium.org>
Auto-Submit: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: default avatarBalazs Engedy <engedy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#707308}
parent 3de20252
......@@ -86,14 +86,6 @@ bool CookieSettingsBase::IsCookieAccessAllowed(
const GURL& url,
const GURL& site_for_cookies,
const base::Optional<url::Origin>& top_frame_origin) const {
// TODO(crbug.com/988398): top_frame_origin is not yet always available.
// Ensure that the DCHECK always passes and remove the FeatureList check.
DCHECK((!base::FeatureList::IsEnabled(kImprovedCookieControls) &&
!base::FeatureList::IsEnabled(
kImprovedCookieControlsForThirdPartyCookieBlocking)) ||
top_frame_origin || site_for_cookies.is_empty())
<< url << " " << site_for_cookies;
ContentSetting setting;
GetCookieSettingInternal(
url, top_frame_origin ? top_frame_origin->GetURL() : site_for_cookies,
......
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