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 // For example, https and wss are secure schemes because they cannot be |
Tom Sepez
2015/04/01 17:11:49
nit: It's weird to start a comment with "For examp
palmer
2015/04/03 19:21:44
Done.
| |
52 // https and data are secure schemes because they cannot be corrupted by | 52 // corrupted by active network attackers, nor eavesdropped on by passive |
53 // active network attackers. | 53 // network attackers.. Subresources transported by secure schemes do not |
Tom Sepez
2015/04/01 17:11:49
nit: ..
palmer
2015/04/03 19:21:44
Done.
| |
54 // trigger mixed content warnings. | |
54 static void registerURLSchemeAsSecure(const String&); | 55 static void registerURLSchemeAsSecure(const String&); |
55 static bool shouldTreatURLSchemeAsSecure(const String&); | 56 static bool shouldTreatURLSchemeAsSecure(const String&); |
56 | 57 |
57 static void registerURLSchemeAsNoAccess(const String&); | 58 static void registerURLSchemeAsNoAccess(const String&); |
58 static bool shouldTreatURLSchemeAsNoAccess(const String&); | 59 static bool shouldTreatURLSchemeAsNoAccess(const String&); |
59 | 60 |
60 // Display-isolated schemes can only be displayed (in the sense of | 61 // Display-isolated schemes can only be displayed (in the sense of |
61 // SecurityOrigin::canDisplay) by documents from the same scheme. | 62 // SecurityOrigin::canDisplay) by documents from the same scheme. |
62 static void registerURLSchemeAsDisplayIsolated(const String&); | 63 static void registerURLSchemeAsDisplayIsolated(const String&); |
63 static bool shouldTreatURLSchemeAsDisplayIsolated(const String&); | 64 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); | 103 static void removeURLSchemeRegisteredAsBypassingContentSecurityPolicy(const String& scheme); |
103 static bool schemeShouldBypassContentSecurityPolicy(const String& scheme, Po licyAreas = PolicyAreaAll); | 104 static bool schemeShouldBypassContentSecurityPolicy(const String& scheme, Po licyAreas = PolicyAreaAll); |
104 | 105 |
105 private: | 106 private: |
106 static const URLSchemesSet& localSchemes(); | 107 static const URLSchemesSet& localSchemes(); |
107 }; | 108 }; |
108 | 109 |
109 } // namespace blink | 110 } // namespace blink |
110 | 111 |
111 #endif // SchemeRegistry_h | 112 #endif // SchemeRegistry_h |
OLD | NEW |