OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/public/common/origin_util.h" | 5 #include "content/public/common/origin_util.h" |
6 | 6 |
7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "content/public/common/content_client.h" | 9 #include "content/public/common/content_client.h" |
10 #include "net/base/net_util.h" | 10 #include "net/base/net_util.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 | 52 |
53 if (ContainsKey(g_trustworthy_whitelist.Get().schemes(), url.scheme())) | 53 if (ContainsKey(g_trustworthy_whitelist.Get().schemes(), url.scheme())) |
54 return true; | 54 return true; |
55 | 55 |
56 if (ContainsKey(g_trustworthy_whitelist.Get().origins(), url.GetOrigin())) | 56 if (ContainsKey(g_trustworthy_whitelist.Get().origins(), url.GetOrigin())) |
57 return true; | 57 return true; |
58 | 58 |
59 return false; | 59 return false; |
60 } | 60 } |
61 | 61 |
| 62 void ResetSecureSchemesAndOriginsForTesting() { |
| 63 g_trustworthy_whitelist.Get().Reset(); |
| 64 } |
| 65 |
62 } // namespace content | 66 } // namespace content |
OLD | NEW |