summaryrefslogtreecommitdiff
path: root/Source/WebCore/page/SecurityPolicy.h
diff options
context:
space:
mode:
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