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

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

Issue 2623353002: Share schemes needed for mixed content checking between the browser and renderer. (Closed)
Patch Set: remove unused public methods Created 3 years, 11 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 | « third_party/WebKit/Source/web/WebSecurityPolicy.cpp ('k') | url/url_util.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 24 matching lines...) Expand all
35 #include "../platform/WebReferrerPolicy.h" 35 #include "../platform/WebReferrerPolicy.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 class WebSecurityOrigin; 39 class WebSecurityOrigin;
40 class WebString; 40 class WebString;
41 class WebURL; 41 class WebURL;
42 42
43 class WebSecurityPolicy { 43 class WebSecurityPolicy {
44 public: 44 public:
45 // Registers a URL scheme to be treated as a local scheme (i.e., with the
46 // same security rules as those applied to "file" URLs). This means that
47 // normal pages cannot link to or access URLs of this scheme.
48 BLINK_EXPORT static void registerURLSchemeAsLocal(const WebString&);
49
50 // Registers a URL scheme to be treated as a noAccess scheme. This means
51 // that pages loaded with this URL scheme cannot access pages loaded with
52 // any other URL scheme.
53 BLINK_EXPORT static void registerURLSchemeAsNoAccess(const WebString&);
54
55 // Registers a URL scheme to be treated as display-isolated. This means 45 // Registers a URL scheme to be treated as display-isolated. This means
56 // that pages cannot display these URLs unless they are from the same 46 // that pages cannot display these URLs unless they are from the same
57 // scheme. For example, pages in other origin cannot create iframes or 47 // scheme. For example, pages in other origin cannot create iframes or
58 // hyperlinks to URLs with the scheme. 48 // hyperlinks to URLs with the scheme.
59 BLINK_EXPORT static void registerURLSchemeAsDisplayIsolated(const WebString&); 49 BLINK_EXPORT static void registerURLSchemeAsDisplayIsolated(const WebString&);
60 50
61 // Subresources transported by secure schemes do not trigger mixed content
62 // warnings. For example, https and data are secure schemes because they
63 // cannot be corrupted by active network attackers.
64 BLINK_EXPORT static void registerURLSchemeAsSecure(const WebString&);
65
66 // Registers a non-HTTP URL scheme which can be sent CORS requests.
67 BLINK_EXPORT static void registerURLSchemeAsCORSEnabled(const WebString&);
68
69 // Registers a URL scheme that can register a ServiceWorker. 51 // Registers a URL scheme that can register a ServiceWorker.
70 BLINK_EXPORT static void registerURLSchemeAsAllowingServiceWorkers( 52 BLINK_EXPORT static void registerURLSchemeAsAllowingServiceWorkers(
71 const WebString&); 53 const WebString&);
72 54
73 // Registers an HTTP-like URL scheme that supports the Fetch API. 55 // Registers an HTTP-like URL scheme that supports the Fetch API.
74 BLINK_EXPORT static void registerURLSchemeAsSupportingFetchAPI( 56 BLINK_EXPORT static void registerURLSchemeAsSupportingFetchAPI(
75 const WebString&); 57 const WebString&);
76 58
77 // Registers a URL scheme whose resources can be loaded regardless of a page's 59 // Registers a URL scheme whose resources can be loaded regardless of a page's
78 // Content Security Policy. 60 // Content Security Policy.
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 BLINK_EXPORT static void registerURLSchemeAsAllowedForReferrer( 124 BLINK_EXPORT static void registerURLSchemeAsAllowedForReferrer(
143 const WebString&); 125 const WebString&);
144 126
145 private: 127 private:
146 WebSecurityPolicy(); 128 WebSecurityPolicy();
147 }; 129 };
148 130
149 } // namespace blink 131 } // namespace blink
150 132
151 #endif 133 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebSecurityPolicy.cpp ('k') | url/url_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698