Remove API SchemeRegistry::ShouldTreatURLSchemeAsNoAccess()
This CL replaces the only use of ShouldTreatURLSchemeAsNoAccess() with a direct call to the corresponding url::GetNoAccessSchemes() API. This removes the need to store a copy of the no-access schemes in SchemeRegistry, which is not kept in sync with the one from url_utils. In particular, this improves consistency between SecurityOrigin's ShouldTreatAsOpaqueOrigin and SchemeHostPort's and fixes the following DCHECK failure when running the test SecurityOrigin.StandardNoAccessScheme added in crbug.com/2602402: [FATAL:security_origin.cc(158)] Check failed: url::SchemeHostPort(protocol.Utf8(), host.Utf8(), port, url::SchemeHostPort::CHECK_CANONICALIZATION) .IsValid(). base::debug::CollectStackTrace() base::debug::StackTrace::StackTrace() logging::LogMessage::~LogMessage() logging::LogMessage::~LogMessage() blink::SecurityOrigin::SecurityOrigin() blink::SecurityOrigin::SecurityOrigin() blink::SecurityOrigin::CreateWithReferenceOrigin() blink::SecurityOrigin::CreateFromString() blink::SecurityOriginTest_StandardNoAccessScheme_Test::TestBody() Bug: 888079, 1021779, 1020201 Change-Id: I7d8481389bd64ccc09f60b31ca6d7291ebedaa7b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2637593Reviewed-by:Mike West <mkwst@chromium.org> Reviewed-by:
Łukasz Anforowicz <lukasza@chromium.org> Commit-Queue: Frédéric Wang <fwang@igalia.com> Cr-Commit-Position: refs/heads/master@{#845075}
Showing
Please register or sign in to comment