Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(450)

Side by Side Diff: third_party/WebKit/Source/platform/weborigin/SchemeRegistry.cpp

Issue 2017053003: Remove StringBuilder::appendLiteral. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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.appendLiteral(", "); 357 builder.append(", ");
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698