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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 { | 347 { |
348 StringBuilder builder; | 348 StringBuilder builder; |
349 bool addSeparator = false; | 349 bool addSeparator = false; |
350 URLSchemesSet schemes; | 350 URLSchemesSet schemes; |
351 { | 351 { |
352 MutexLocker locker(mutex()); | 352 MutexLocker locker(mutex()); |
353 schemes = CORSEnabledSchemes(); | 353 schemes = CORSEnabledSchemes(); |
354 } | 354 } |
355 for (const auto& scheme : schemes) { | 355 for (const auto& scheme : schemes) { |
356 if (addSeparator) | 356 if (addSeparator) |
357 builder.append(", "); | 357 builder.appendLiteral(", "); |
358 else | 358 else |
359 addSeparator = true; | 359 addSeparator = true; |
360 | 360 |
361 builder.append(scheme); | 361 builder.append(scheme); |
362 } | 362 } |
363 return builder.toString(); | 363 return builder.toString(); |
364 } | 364 } |
365 | 365 |
366 bool SchemeRegistry::shouldTreatURLSchemeAsLegacy(const String& scheme) | 366 bool SchemeRegistry::shouldTreatURLSchemeAsLegacy(const String& scheme) |
367 { | 367 { |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 | 462 |
463 bool SchemeRegistry::schemeShouldBypassSecureContextCheck(const String& scheme) | 463 bool SchemeRegistry::schemeShouldBypassSecureContextCheck(const String& scheme) |
464 { | 464 { |
465 if (scheme.isEmpty()) | 465 if (scheme.isEmpty()) |
466 return false; | 466 return false; |
467 MutexLocker locker(mutex()); | 467 MutexLocker locker(mutex()); |
468 return secureContextBypassingSchemes().contains(scheme.lower()); | 468 return secureContextBypassingSchemes().contains(scheme.lower()); |
469 } | 469 } |
470 | 470 |
471 } // namespace blink | 471 } // namespace blink |
OLD | NEW |