From 152c1544d6966e15ca0b976c4e498caf56b79c73 Mon Sep 17 00:00:00 2001 From: Jose Dapena Paz Date: Mon, 5 Mar 2018 15:59:12 +0000 Subject: [PATCH 6/7] GCC: do not use initializer list for NoDestructor of a flat_set. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Compilation in GCC 7.x fails in SupervisedURLFilter, creating a base::NoDestructor of a flat_set initialized with braces initializer list syntax, as it fails to retrieve the right constructor (it states the constructors are ambiguous). Workaround the problem explicitely declaring flat_set constructor. Change-Id: Icff5021685a6cbc727d5f4fb5fc6d2ce94fe9921 Reviewed-on: https://chromium-review.googlesource.com/944405 Commit-Queue: José Dapena Paz Reviewed-by: Bernhard Bauer Reviewed-by: Marc Treib Cr-Commit-Position: refs/heads/master@{#540828} --- chrome/browser/supervised_user/supervised_user_url_filter.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/browser/supervised_user/supervised_user_url_filter.cc b/chrome/browser/supervised_user/supervised_user_url_filter.cc index 64d6569088d1..a3a81d77f0a3 100644 --- a/chrome/browser/supervised_user/supervised_user_url_filter.cc +++ b/chrome/browser/supervised_user/supervised_user_url_filter.cc @@ -368,7 +368,7 @@ SupervisedUserURLFilter::GetFilteringBehaviorForURL( // Allow navigations to whitelisted origins (currently families.google.com). static const base::NoDestructor> kWhitelistedOrigins( - {GURL(kFamiliesUrl).GetOrigin()}); + base::flat_set({GURL(kFamiliesUrl).GetOrigin()})); if (base::ContainsKey(*kWhitelistedOrigins, effective_url.GetOrigin())) return ALLOW; -- 2.17.0