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

Side by Side Diff: Source/web/WebSecurityPolicy.cpp

Issue 1313733006: Allowing registering arbitrary schemes as supporting the fetch API. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: http-like #2 Created 5 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
« no previous file with comments | « Source/platform/weborigin/SchemeRegistry.cpp ('k') | public/web/WebSecurityPolicy.h » ('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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 void WebSecurityPolicy::registerURLSchemeAsCORSEnabled(const WebString& scheme) 74 void WebSecurityPolicy::registerURLSchemeAsCORSEnabled(const WebString& scheme)
75 { 75 {
76 SchemeRegistry::registerURLSchemeAsCORSEnabled(scheme); 76 SchemeRegistry::registerURLSchemeAsCORSEnabled(scheme);
77 } 77 }
78 78
79 void WebSecurityPolicy::registerURLSchemeAsAllowingServiceWorkers(const WebStrin g& scheme) 79 void WebSecurityPolicy::registerURLSchemeAsAllowingServiceWorkers(const WebStrin g& scheme)
80 { 80 {
81 SchemeRegistry::registerURLSchemeAsAllowingServiceWorkers(scheme); 81 SchemeRegistry::registerURLSchemeAsAllowingServiceWorkers(scheme);
82 } 82 }
83 83
84 void WebSecurityPolicy::registerURLSchemeAsSupportingFetchAPI(const WebString& s cheme)
85 {
86 SchemeRegistry::registerURLSchemeAsSupportingFetchAPI(scheme);
87 }
88
84 void WebSecurityPolicy::registerURLSchemeAsBypassingContentSecurityPolicy(const WebString& scheme) 89 void WebSecurityPolicy::registerURLSchemeAsBypassingContentSecurityPolicy(const WebString& scheme)
85 { 90 {
86 SchemeRegistry::registerURLSchemeAsBypassingContentSecurityPolicy(scheme); 91 SchemeRegistry::registerURLSchemeAsBypassingContentSecurityPolicy(scheme);
87 } 92 }
88 93
89 void WebSecurityPolicy::registerURLSchemeAsBypassingContentSecurityPolicy(const WebString& scheme, PolicyAreas policyAreas) 94 void WebSecurityPolicy::registerURLSchemeAsBypassingContentSecurityPolicy(const WebString& scheme, PolicyAreas policyAreas)
90 { 95 {
91 SchemeRegistry::registerURLSchemeAsBypassingContentSecurityPolicy(scheme, st atic_cast<SchemeRegistry::PolicyAreas>(policyAreas)); 96 SchemeRegistry::registerURLSchemeAsBypassingContentSecurityPolicy(scheme, st atic_cast<SchemeRegistry::PolicyAreas>(policyAreas));
92 } 97 }
93 98
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 { 137 {
133 return SecurityPolicy::generateReferrer(static_cast<ReferrerPolicy>(referrer Policy), url, referrer).referrer; 138 return SecurityPolicy::generateReferrer(static_cast<ReferrerPolicy>(referrer Policy), url, referrer).referrer;
134 } 139 }
135 140
136 void WebSecurityPolicy::registerURLSchemeAsNotAllowingJavascriptURLs(const WebSt ring& scheme) 141 void WebSecurityPolicy::registerURLSchemeAsNotAllowingJavascriptURLs(const WebSt ring& scheme)
137 { 142 {
138 SchemeRegistry::registerURLSchemeAsNotAllowingJavascriptURLs(scheme); 143 SchemeRegistry::registerURLSchemeAsNotAllowingJavascriptURLs(scheme);
139 } 144 }
140 145
141 } // namespace blink 146 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/weborigin/SchemeRegistry.cpp ('k') | public/web/WebSecurityPolicy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698