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

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

Issue 1305253012: Allow 'chrome-extension:' URLs to bypass content settings (1/2) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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') | Source/web/tests/WebDocumentTest.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) 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 void WebSecurityPolicy::registerURLSchemeAsBypassingContentSecurityPolicy(const WebString& scheme) 89 void WebSecurityPolicy::registerURLSchemeAsBypassingContentSecurityPolicy(const WebString& scheme)
90 { 90 {
91 SchemeRegistry::registerURLSchemeAsBypassingContentSecurityPolicy(scheme); 91 SchemeRegistry::registerURLSchemeAsBypassingContentSecurityPolicy(scheme);
92 } 92 }
93 93
94 void WebSecurityPolicy::registerURLSchemeAsBypassingContentSecurityPolicy(const WebString& scheme, PolicyAreas policyAreas) 94 void WebSecurityPolicy::registerURLSchemeAsBypassingContentSecurityPolicy(const WebString& scheme, PolicyAreas policyAreas)
95 { 95 {
96 SchemeRegistry::registerURLSchemeAsBypassingContentSecurityPolicy(scheme, st atic_cast<SchemeRegistry::PolicyAreas>(policyAreas)); 96 SchemeRegistry::registerURLSchemeAsBypassingContentSecurityPolicy(scheme, st atic_cast<SchemeRegistry::PolicyAreas>(policyAreas));
97 } 97 }
98 98
99 void WebSecurityPolicy::registerURLSchemeAsFirstPartyWhenTopLevel(const WebStrin g& scheme)
100 {
101 SchemeRegistry::registerURLSchemeAsFirstPartyWhenTopLevel(scheme);
102 }
103
99 void WebSecurityPolicy::registerURLSchemeAsEmptyDocument(const WebString& scheme ) 104 void WebSecurityPolicy::registerURLSchemeAsEmptyDocument(const WebString& scheme )
100 { 105 {
101 SchemeRegistry::registerURLSchemeAsEmptyDocument(scheme); 106 SchemeRegistry::registerURLSchemeAsEmptyDocument(scheme);
102 } 107 }
103 108
104 void WebSecurityPolicy::addOriginAccessWhitelistEntry( 109 void WebSecurityPolicy::addOriginAccessWhitelistEntry(
105 const WebURL& sourceOrigin, 110 const WebURL& sourceOrigin,
106 const WebString& destinationProtocol, 111 const WebString& destinationProtocol,
107 const WebString& destinationHost, 112 const WebString& destinationHost,
108 bool allowDestinationSubdomains) 113 bool allowDestinationSubdomains)
(...skipping 28 matching lines...) Expand all
137 { 142 {
138 return SecurityPolicy::generateReferrer(static_cast<ReferrerPolicy>(referrer Policy), url, referrer).referrer; 143 return SecurityPolicy::generateReferrer(static_cast<ReferrerPolicy>(referrer Policy), url, referrer).referrer;
139 } 144 }
140 145
141 void WebSecurityPolicy::registerURLSchemeAsNotAllowingJavascriptURLs(const WebSt ring& scheme) 146 void WebSecurityPolicy::registerURLSchemeAsNotAllowingJavascriptURLs(const WebSt ring& scheme)
142 { 147 {
143 SchemeRegistry::registerURLSchemeAsNotAllowingJavascriptURLs(scheme); 148 SchemeRegistry::registerURLSchemeAsNotAllowingJavascriptURLs(scheme);
144 } 149 }
145 150
146 } // namespace blink 151 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/weborigin/SchemeRegistry.cpp ('k') | Source/web/tests/WebDocumentTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698