OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2010 Apple Inc. All Rights Reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 30 matching lines...) Expand all Loading... |
41 using URLSchemesMap = HashMap<String, T, CaseFoldingHash>; | 41 using URLSchemesMap = HashMap<String, T, CaseFoldingHash>; |
42 | 42 |
43 class PLATFORM_EXPORT SchemeRegistry { | 43 class PLATFORM_EXPORT SchemeRegistry { |
44 public: | 44 public: |
45 static void registerURLSchemeAsLocal(const String&); | 45 static void registerURLSchemeAsLocal(const String&); |
46 static bool shouldTreatURLSchemeAsLocal(const String&); | 46 static bool shouldTreatURLSchemeAsLocal(const String&); |
47 | 47 |
48 static void registerURLSchemeAsRestrictingMixedContent(const String&); | 48 static void registerURLSchemeAsRestrictingMixedContent(const String&); |
49 static bool shouldTreatURLSchemeAsRestrictingMixedContent(const String&); | 49 static bool shouldTreatURLSchemeAsRestrictingMixedContent(const String&); |
50 | 50 |
51 // Secure schemes do not trigger mixed content warnings. For example, | 51 // Subresources transported by secure schemes do not trigger mixed content |
52 // https and data are secure schemes because they cannot be corrupted by | 52 // warnings. For example, https and data are secure schemes because they |
53 // active network attackers. | 53 // cannot be corrupted by active network attackers. |
54 static void registerURLSchemeAsSecure(const String&); | 54 static void registerURLSchemeAsSecure(const String&); |
55 static bool shouldTreatURLSchemeAsSecure(const String&); | 55 static bool shouldTreatURLSchemeAsSecure(const String&); |
56 | 56 |
57 static void registerURLSchemeAsNoAccess(const String&); | 57 static void registerURLSchemeAsNoAccess(const String&); |
58 static bool shouldTreatURLSchemeAsNoAccess(const String&); | 58 static bool shouldTreatURLSchemeAsNoAccess(const String&); |
59 | 59 |
60 // Display-isolated schemes can only be displayed (in the sense of | 60 // Display-isolated schemes can only be displayed (in the sense of |
61 // SecurityOrigin::canDisplay) by documents from the same scheme. | 61 // SecurityOrigin::canDisplay) by documents from the same scheme. |
62 static void registerURLSchemeAsDisplayIsolated(const String&); | 62 static void registerURLSchemeAsDisplayIsolated(const String&); |
63 static bool shouldTreatURLSchemeAsDisplayIsolated(const String&); | 63 static bool shouldTreatURLSchemeAsDisplayIsolated(const String&); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 static void removeURLSchemeRegisteredAsBypassingContentSecurityPolicy(const
String& scheme); | 102 static void removeURLSchemeRegisteredAsBypassingContentSecurityPolicy(const
String& scheme); |
103 static bool schemeShouldBypassContentSecurityPolicy(const String& scheme, Po
licyAreas = PolicyAreaAll); | 103 static bool schemeShouldBypassContentSecurityPolicy(const String& scheme, Po
licyAreas = PolicyAreaAll); |
104 | 104 |
105 private: | 105 private: |
106 static const URLSchemesSet& localSchemes(); | 106 static const URLSchemesSet& localSchemes(); |
107 }; | 107 }; |
108 | 108 |
109 } // namespace blink | 109 } // namespace blink |
110 | 110 |
111 #endif // SchemeRegistry_h | 111 #endif // SchemeRegistry_h |
OLD | NEW |