Commit 2e0f0bb3 authored by Raphael Kubo da Costa's avatar Raphael Kubo da Costa Committed by Commit Bot

NavigationURLLoaderImpl: Fix GCC build after #580595

Commit bf7722f9 ('Reland "Fixes
ExtensionWebRequestApiTest.WebRequestBlocking with network service"') caused
the GCC build to hit https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84849,
where having base::NoDestructor<T<U>> and passing an initializer list of Us
does not work.

Explicitly create an std::set<string> to pass to base::NoDestructor, just
like we did in https://chromium-review.googlesource.com/944405 before.

Bug: 819294
Change-Id: I8077b39959d8a53daef40bc33f8293f15c597ce0
Reviewed-on: https://chromium-review.googlesource.com/1165360Reviewed-by: default avatarMatt Menke <mmenke@chromium.org>
Reviewed-by: default avatarCharlie Harrison <csharrison@chromium.org>
Commit-Queue: Raphael Kubo da Costa (CET) <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#581287}
parent f339543f
......@@ -313,10 +313,11 @@ bool IsURLHandledByDefaultLoader(const GURL& url) {
// Determines whether it is safe to redirect to |url|.
bool IsSafeRedirectTarget(const GURL& url, ResourceContext* resource_context) {
static base::NoDestructor<std::set<std::string>> kUnsafeSchemes({
url::kAboutScheme, url::kDataScheme, url::kFileScheme,
url::kFileSystemScheme,
});
static base::NoDestructor<std::set<std::string>> kUnsafeSchemes(
std::set<std::string>({
url::kAboutScheme, url::kDataScheme, url::kFileScheme,
url::kFileSystemScheme,
}));
return !HasWebUIScheme(url) &&
kUnsafeSchemes->find(url.scheme()) == kUnsafeSchemes->end() &&
GetContentClient()->browser()->IsSafeRedirectTarget(url,
......
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