-
Notifications
You must be signed in to change notification settings - Fork 0
/
0001-GCC-do-not-use-initializer-list-for-NoDestructor-of-.patch
46 lines (40 loc) · 1.88 KB
/
0001-GCC-do-not-use-initializer-list-for-NoDestructor-of-.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
From 5fae09e39e9dcb6750a99a27ee25d2e141d42a4f Mon Sep 17 00:00:00 2001
From: Jose Dapena Paz <[email protected]>
Date: Mon, 5 Mar 2018 15:59:12 +0000
Subject: [PATCH] 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 <[email protected]>
Reviewed-by: Bernhard Bauer <[email protected]>
Reviewed-by: Marc Treib <[email protected]>
Cr-Commit-Position: refs/heads/master@{#540828}
---
chrome/browser/supervised_user/supervised_user_url_filter.cc | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/chrome/browser/supervised_user/supervised_user_url_filter.cc b/chrome/browser/supervised_user/supervised_user_url_filter.cc
index 6d56c9d70079..13f388221f77 100644
--- a/chrome/browser/supervised_user/supervised_user_url_filter.cc
+++ b/chrome/browser/supervised_user/supervised_user_url_filter.cc
@@ -367,6 +367,12 @@ SupervisedUserURLFilter::GetFilteringBehaviorForURL(
}
#endif
+ // Allow navigations to whitelisted origins (currently families.google.com).
+ static const base::NoDestructor<base::flat_set<GURL>> kWhitelistedOrigins(
+ base::flat_set<GURL>({GURL(kFamiliesUrl).GetOrigin()}));
+ if (base::ContainsKey(*kWhitelistedOrigins, effective_url.GetOrigin()))
+ return ALLOW;
+
// Check manual overrides for the exact URL.
auto url_it = url_map_.find(Normalize(effective_url));
if (url_it != url_map_.end())
--
2.14.3