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

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

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

Powered by Google App Engine
This is Rietveld 408576698