| 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 DCHECK_EQ(scheme, scheme.lower()); | 320 DCHECK_EQ(scheme, scheme.lower()); |
| 321 if (scheme.isEmpty()) | 321 if (scheme.isEmpty()) |
| 322 return false; | 322 return false; |
| 323 return getURLSchemesRegistry().allowedInReferrerSchemes.contains(scheme); | 323 return getURLSchemesRegistry().allowedInReferrerSchemes.contains(scheme); |
| 324 } | 324 } |
| 325 | 325 |
| 326 void SchemeRegistry::registerURLSchemeAsBypassingContentSecurityPolicy( | 326 void SchemeRegistry::registerURLSchemeAsBypassingContentSecurityPolicy( |
| 327 const String& scheme, | 327 const String& scheme, |
| 328 PolicyAreas policyAreas) { | 328 PolicyAreas policyAreas) { |
| 329 DCHECK_EQ(scheme, scheme.lower()); | 329 DCHECK_EQ(scheme, scheme.lower()); |
| 330 getMutableURLSchemesRegistry().contentSecurityPolicyBypassingSchemes.add( | 330 getMutableURLSchemesRegistry().contentSecurityPolicyBypassingSchemes.insert( |
| 331 scheme, policyAreas); | 331 scheme, policyAreas); |
| 332 } | 332 } |
| 333 | 333 |
| 334 void SchemeRegistry::removeURLSchemeRegisteredAsBypassingContentSecurityPolicy( | 334 void SchemeRegistry::removeURLSchemeRegisteredAsBypassingContentSecurityPolicy( |
| 335 const String& scheme) { | 335 const String& scheme) { |
| 336 DCHECK_EQ(scheme, scheme.lower()); | 336 DCHECK_EQ(scheme, scheme.lower()); |
| 337 getMutableURLSchemesRegistry().contentSecurityPolicyBypassingSchemes.erase( | 337 getMutableURLSchemesRegistry().contentSecurityPolicyBypassingSchemes.erase( |
| 338 scheme); | 338 scheme); |
| 339 } | 339 } |
| 340 | 340 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 360 | 360 |
| 361 bool SchemeRegistry::schemeShouldBypassSecureContextCheck( | 361 bool SchemeRegistry::schemeShouldBypassSecureContextCheck( |
| 362 const String& scheme) { | 362 const String& scheme) { |
| 363 if (scheme.isEmpty()) | 363 if (scheme.isEmpty()) |
| 364 return false; | 364 return false; |
| 365 DCHECK_EQ(scheme, scheme.lower()); | 365 DCHECK_EQ(scheme, scheme.lower()); |
| 366 return getURLSchemesRegistry().secureContextBypassingSchemes.contains(scheme); | 366 return getURLSchemesRegistry().secureContextBypassingSchemes.contains(scheme); |
| 367 } | 367 } |
| 368 | 368 |
| 369 } // namespace blink | 369 } // namespace blink |
| OLD | NEW |