summaryrefslogtreecommitdiff
path: root/Source/WebCore/page/SecurityPolicy.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/page/SecurityPolicy.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/page/SecurityPolicy.h')
-rw-r--r--Source/WebCore/page/SecurityPolicy.h24
1 files changed, 10 insertions, 14 deletions
diff --git a/Source/WebCore/page/SecurityPolicy.h b/Source/WebCore/page/SecurityPolicy.h
index b269c1af5..6c818fd62 100644
--- a/Source/WebCore/page/SecurityPolicy.h
+++ b/Source/WebCore/page/SecurityPolicy.h
@@ -26,28 +26,26 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef SecurityPolicy_h
-#define SecurityPolicy_h
+#pragma once
#include "ReferrerPolicy.h"
#include <wtf/text/WTFString.h>
namespace WebCore {
-class URL;
class SecurityOrigin;
+class URL;
class SecurityPolicy {
public:
- // True if the referrer should be omitted according to the
- // ReferrerPolicyDefault. If you intend to send a referrer header, you
- // should use generateReferrerHeader instead.
- static bool shouldHideReferrer(const URL&, const String& referrer);
+ // True if the referrer should be omitted according to ReferrerPolicy::Default.
+ // If you intend to send a referrer header, you should use generateReferrerHeader instead.
+ WEBCORE_EXPORT static bool shouldHideReferrer(const URL&, const String& referrer);
// Returns the referrer modified according to the referrer policy for a
// navigation to a given URL. If the referrer returned is empty, the
// referrer header should be omitted.
- static String generateReferrerHeader(ReferrerPolicy, const URL&, const String& referrer);
+ WEBCORE_EXPORT static String generateReferrerHeader(ReferrerPolicy, const URL&, const String& referrer);
enum LocalLoadPolicy {
AllowLocalLoadsForAll, // No restriction on local loads.
@@ -55,18 +53,16 @@ public:
AllowLocalLoadsForLocalOnly,
};
- static void setLocalLoadPolicy(LocalLoadPolicy);
+ WEBCORE_EXPORT static void setLocalLoadPolicy(LocalLoadPolicy);
static bool restrictAccessToLocal();
static bool allowSubstituteDataAccessToLocal();
- static void addOriginAccessWhitelistEntry(const SecurityOrigin& sourceOrigin, const String& destinationProtocol, const String& destinationDomain, bool allowDestinationSubdomains);
- static void removeOriginAccessWhitelistEntry(const SecurityOrigin& sourceOrigin, const String& destinationProtocol, const String& destinationDomain, bool allowDestinationSubdomains);
- static void resetOriginAccessWhitelists();
+ WEBCORE_EXPORT static void addOriginAccessWhitelistEntry(const SecurityOrigin& sourceOrigin, const String& destinationProtocol, const String& destinationDomain, bool allowDestinationSubdomains);
+ WEBCORE_EXPORT static void removeOriginAccessWhitelistEntry(const SecurityOrigin& sourceOrigin, const String& destinationProtocol, const String& destinationDomain, bool allowDestinationSubdomains);
+ WEBCORE_EXPORT static void resetOriginAccessWhitelists();
static bool isAccessWhiteListed(const SecurityOrigin* activeOrigin, const SecurityOrigin* targetOrigin);
static bool isAccessToURLWhiteListed(const SecurityOrigin* activeOrigin, const URL&);
};
} // namespace WebCore
-
-#endif // SecurityPolicy_h