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

Side by Side Diff: public/web/WebSecurityPolicy.h

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/web/tests/WebDocumentTest.cpp ('k') | no next file » | 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 // Registers a URL scheme that can register a ServiceWorker. 76 // Registers a URL scheme that can register a ServiceWorker.
77 BLINK_EXPORT static void registerURLSchemeAsAllowingServiceWorkers(const Web String&); 77 BLINK_EXPORT static void registerURLSchemeAsAllowingServiceWorkers(const Web String&);
78 78
79 // Registers an HTTP-like URL scheme that supports the Fetch API. 79 // Registers an HTTP-like URL scheme that supports the Fetch API.
80 BLINK_EXPORT static void registerURLSchemeAsSupportingFetchAPI(const WebStri ng&); 80 BLINK_EXPORT static void registerURLSchemeAsSupportingFetchAPI(const WebStri ng&);
81 81
82 // Registers a URL scheme whose resources can be loaded regardless of a page 's Content Security Policy. 82 // Registers a URL scheme whose resources can be loaded regardless of a page 's Content Security Policy.
83 BLINK_EXPORT static void registerURLSchemeAsBypassingContentSecurityPolicy(c onst WebString&); 83 BLINK_EXPORT static void registerURLSchemeAsBypassingContentSecurityPolicy(c onst WebString&);
84 84
85 // Registers a URL scheme which will always be considered the first-party wh en loaded in a top-level context.
86 BLINK_EXPORT static void registerURLSchemeAsFirstPartyWhenTopLevel(const Web String&);
87
85 // Registers a URL scheme for which some kinds of resources bypass Content S ecurity Policy. 88 // Registers a URL scheme for which some kinds of resources bypass Content S ecurity Policy.
86 // This enum should be kept in sync with Source/platform/weborigin/SchemeReg istry.h. 89 // This enum should be kept in sync with Source/platform/weborigin/SchemeReg istry.h.
87 // Enforced in AssertMatchingEnums.cpp. 90 // Enforced in AssertMatchingEnums.cpp.
88 enum PolicyAreas : uint32_t { 91 enum PolicyAreas : uint32_t {
89 PolicyAreaNone = 0, 92 PolicyAreaNone = 0,
90 PolicyAreaImage = 1 << 0, 93 PolicyAreaImage = 1 << 0,
91 PolicyAreaStyle = 1 << 1, 94 PolicyAreaStyle = 1 << 1,
92 // Add more policy areas as needed by clients. 95 // Add more policy areas as needed by clients.
93 PolicyAreaAll = ~static_cast<uint32_t>(0), 96 PolicyAreaAll = ~static_cast<uint32_t>(0),
94 }; 97 };
(...skipping 24 matching lines...) Expand all
119 // by bookmarklets or javascript: URLs typed in the omnibox. 122 // by bookmarklets or javascript: URLs typed in the omnibox.
120 BLINK_EXPORT static void registerURLSchemeAsNotAllowingJavascriptURLs(const WebString&); 123 BLINK_EXPORT static void registerURLSchemeAsNotAllowingJavascriptURLs(const WebString&);
121 124
122 private: 125 private:
123 WebSecurityPolicy(); 126 WebSecurityPolicy();
124 }; 127 };
125 128
126 } // namespace blink 129 } // namespace blink
127 130
128 #endif 131 #endif
OLDNEW
« no previous file with comments | « Source/web/tests/WebDocumentTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698