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

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

Issue 2673543003: Migrate WTF::HashMap::remove() to ::erase() (Closed)
Patch Set: Created 3 years, 10 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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
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.add(
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.remove( 337 getMutableURLSchemesRegistry().contentSecurityPolicyBypassingSchemes.erase(
338 scheme); 338 scheme);
339 } 339 }
340 340
341 bool SchemeRegistry::schemeShouldBypassContentSecurityPolicy( 341 bool SchemeRegistry::schemeShouldBypassContentSecurityPolicy(
342 const String& scheme, 342 const String& scheme,
343 PolicyAreas policyAreas) { 343 PolicyAreas policyAreas) {
344 ASSERT(policyAreas != PolicyAreaNone); 344 ASSERT(policyAreas != PolicyAreaNone);
345 if (scheme.isEmpty() || policyAreas == PolicyAreaNone) 345 if (scheme.isEmpty() || policyAreas == PolicyAreaNone)
346 return false; 346 return false;
347 347
(...skipping 12 matching lines...) Expand all
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698