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

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

Issue 2809123002: ur_ls -> urls in platform/weborigin (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/weborigin/SecurityPolicyTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 empty_document_schemes.insert(scheme.c_str()); 61 empty_document_schemes.insert(scheme.c_str());
62 } 62 }
63 ~URLSchemesRegistry() = default; 63 ~URLSchemesRegistry() = default;
64 64
65 URLSchemesSet local_schemes; 65 URLSchemesSet local_schemes;
66 URLSchemesSet display_isolated_url_schemes; 66 URLSchemesSet display_isolated_url_schemes;
67 URLSchemesSet secure_schemes; 67 URLSchemesSet secure_schemes;
68 URLSchemesSet schemes_with_unique_origins; 68 URLSchemesSet schemes_with_unique_origins;
69 URLSchemesSet empty_document_schemes; 69 URLSchemesSet empty_document_schemes;
70 URLSchemesSet schemes_forbidden_from_domain_relaxation; 70 URLSchemesSet schemes_forbidden_from_domain_relaxation;
71 URLSchemesSet not_allowing_javascript_ur_ls_schemes; 71 URLSchemesSet not_allowing_javascript_urls_schemes;
72 URLSchemesSet cors_enabled_schemes; 72 URLSchemesSet cors_enabled_schemes;
73 URLSchemesSet service_worker_schemes; 73 URLSchemesSet service_worker_schemes;
74 URLSchemesSet fetch_api_schemes; 74 URLSchemesSet fetch_api_schemes;
75 URLSchemesSet first_party_when_top_level_schemes; 75 URLSchemesSet first_party_when_top_level_schemes;
76 URLSchemesMap<SchemeRegistry::PolicyAreas> 76 URLSchemesMap<SchemeRegistry::PolicyAreas>
77 content_security_policy_bypassing_schemes; 77 content_security_policy_bypassing_schemes;
78 URLSchemesSet secure_context_bypassing_schemes; 78 URLSchemesSet secure_context_bypassing_schemes;
79 URLSchemesSet allowed_in_referrer_schemes; 79 URLSchemesSet allowed_in_referrer_schemes;
80 80
81 private: 81 private:
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 } 195 }
196 196
197 bool SchemeRegistry::CanDisplayOnlyIfCanRequest(const String& scheme) { 197 bool SchemeRegistry::CanDisplayOnlyIfCanRequest(const String& scheme) {
198 DCHECK_EQ(scheme, scheme.DeprecatedLower()); 198 DCHECK_EQ(scheme, scheme.DeprecatedLower());
199 return scheme == "blob" || scheme == "filesystem"; 199 return scheme == "blob" || scheme == "filesystem";
200 } 200 }
201 201
202 void SchemeRegistry::RegisterURLSchemeAsNotAllowingJavascriptURLs( 202 void SchemeRegistry::RegisterURLSchemeAsNotAllowingJavascriptURLs(
203 const String& scheme) { 203 const String& scheme) {
204 DCHECK_EQ(scheme, scheme.DeprecatedLower()); 204 DCHECK_EQ(scheme, scheme.DeprecatedLower());
205 GetMutableURLSchemesRegistry().not_allowing_javascript_ur_ls_schemes.insert( 205 GetMutableURLSchemesRegistry().not_allowing_javascript_urls_schemes.insert(
206 scheme); 206 scheme);
207 } 207 }
208 208
209 bool SchemeRegistry::ShouldTreatURLSchemeAsNotAllowingJavascriptURLs( 209 bool SchemeRegistry::ShouldTreatURLSchemeAsNotAllowingJavascriptURLs(
210 const String& scheme) { 210 const String& scheme) {
211 DCHECK_EQ(scheme, scheme.DeprecatedLower()); 211 DCHECK_EQ(scheme, scheme.DeprecatedLower());
212 if (scheme.IsEmpty()) 212 if (scheme.IsEmpty())
213 return false; 213 return false;
214 return GetURLSchemesRegistry().not_allowing_javascript_ur_ls_schemes.Contains( 214 return GetURLSchemesRegistry().not_allowing_javascript_urls_schemes.Contains(
215 scheme); 215 scheme);
216 } 216 }
217 217
218 void SchemeRegistry::RegisterURLSchemeAsCORSEnabled(const String& scheme) { 218 void SchemeRegistry::RegisterURLSchemeAsCORSEnabled(const String& scheme) {
219 DCHECK_EQ(scheme, scheme.DeprecatedLower()); 219 DCHECK_EQ(scheme, scheme.DeprecatedLower());
220 GetMutableURLSchemesRegistry().cors_enabled_schemes.insert(scheme); 220 GetMutableURLSchemesRegistry().cors_enabled_schemes.insert(scheme);
221 } 221 }
222 222
223 bool SchemeRegistry::ShouldTreatURLSchemeAsCORSEnabled(const String& scheme) { 223 bool SchemeRegistry::ShouldTreatURLSchemeAsCORSEnabled(const String& scheme) {
224 DCHECK_EQ(scheme, scheme.DeprecatedLower()); 224 DCHECK_EQ(scheme, scheme.DeprecatedLower());
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 bool SchemeRegistry::SchemeShouldBypassSecureContextCheck( 365 bool SchemeRegistry::SchemeShouldBypassSecureContextCheck(
366 const String& scheme) { 366 const String& scheme) {
367 if (scheme.IsEmpty()) 367 if (scheme.IsEmpty())
368 return false; 368 return false;
369 DCHECK_EQ(scheme, scheme.DeprecatedLower()); 369 DCHECK_EQ(scheme, scheme.DeprecatedLower());
370 return GetURLSchemesRegistry().secure_context_bypassing_schemes.Contains( 370 return GetURLSchemesRegistry().secure_context_bypassing_schemes.Contains(
371 scheme); 371 scheme);
372 } 372 }
373 373
374 } // namespace blink 374 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/weborigin/SecurityPolicyTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698