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

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

Issue 2333753002: Remove equalIgnoringCase in Source/platform/weborigin/ (Closed)
Patch Set: Created 4 years, 3 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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 bool SchemeRegistry::isDomainRelaxationForbiddenForURLScheme(const String& schem e) 295 bool SchemeRegistry::isDomainRelaxationForbiddenForURLScheme(const String& schem e)
296 { 296 {
297 if (scheme.isEmpty()) 297 if (scheme.isEmpty())
298 return false; 298 return false;
299 MutexLocker locker(mutex()); 299 MutexLocker locker(mutex());
300 return schemesForbiddenFromDomainRelaxation().contains(scheme); 300 return schemesForbiddenFromDomainRelaxation().contains(scheme);
301 } 301 }
302 302
303 bool SchemeRegistry::canDisplayOnlyIfCanRequest(const String& scheme) 303 bool SchemeRegistry::canDisplayOnlyIfCanRequest(const String& scheme)
304 { 304 {
305 return equalIgnoringCase("blob", scheme) || equalIgnoringCase("filesystem", scheme); 305 return equalIgnoringASCIICase("blob", scheme) || equalIgnoringASCIICase("fil esystem", scheme);
306 } 306 }
307 307
308 void SchemeRegistry::registerURLSchemeAsNotAllowingJavascriptURLs(const String& scheme) 308 void SchemeRegistry::registerURLSchemeAsNotAllowingJavascriptURLs(const String& scheme)
309 { 309 {
310 MutexLocker locker(mutex()); 310 MutexLocker locker(mutex());
311 notAllowingJavascriptURLsSchemes().add(scheme); 311 notAllowingJavascriptURLsSchemes().add(scheme);
312 } 312 }
313 313
314 bool SchemeRegistry::shouldTreatURLSchemeAsNotAllowingJavascriptURLs(const Strin g& scheme) 314 bool SchemeRegistry::shouldTreatURLSchemeAsNotAllowingJavascriptURLs(const Strin g& scheme)
315 { 315 {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 else 348 else
349 addSeparator = true; 349 addSeparator = true;
350 350
351 builder.append(scheme); 351 builder.append(scheme);
352 } 352 }
353 return builder.toString(); 353 return builder.toString();
354 } 354 }
355 355
356 bool SchemeRegistry::shouldTreatURLSchemeAsLegacy(const String& scheme) 356 bool SchemeRegistry::shouldTreatURLSchemeAsLegacy(const String& scheme)
357 { 357 {
358 return equalIgnoringCase("ftp", scheme) || equalIgnoringCase("gopher", schem e); 358 return equalIgnoringASCIICase("ftp", scheme) || equalIgnoringASCIICase("goph er", scheme);
359 } 359 }
360 360
361 void SchemeRegistry::registerURLSchemeAsAllowingServiceWorkers(const String& sch eme) 361 void SchemeRegistry::registerURLSchemeAsAllowingServiceWorkers(const String& sch eme)
362 { 362 {
363 MutexLocker locker(mutex()); 363 MutexLocker locker(mutex());
364 serviceWorkerSchemes().add(scheme); 364 serviceWorkerSchemes().add(scheme);
365 } 365 }
366 366
367 bool SchemeRegistry::shouldTreatURLSchemeAsAllowingServiceWorkers(const String& scheme) 367 bool SchemeRegistry::shouldTreatURLSchemeAsAllowingServiceWorkers(const String& scheme)
368 { 368 {
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 458
459 bool SchemeRegistry::schemeShouldBypassSecureContextCheck(const String& scheme) 459 bool SchemeRegistry::schemeShouldBypassSecureContextCheck(const String& scheme)
460 { 460 {
461 if (scheme.isEmpty()) 461 if (scheme.isEmpty())
462 return false; 462 return false;
463 MutexLocker locker(mutex()); 463 MutexLocker locker(mutex());
464 return secureContextBypassingSchemes().contains(scheme.lower()); 464 return secureContextBypassingSchemes().contains(scheme.lower());
465 } 465 }
466 466
467 } // namespace blink 467 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698