mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-29 10:32:23 +00:00
d9c067aad2
- Bug 1143922 - Add AsyncOpen2 to nsIChannel and perform security checs when opening a channel - securitymanager (r=sicking,tanvi) (4b78431d8)
- Bug 1143922 - Add AsyncOpen2 to nsIChannel and perform security checks when opening a channel - channel changes (r=mcmanus,sicking) (139445975)
- Bug 1143922 - Add AsyncOpen2 to nsIChannel and perform security checks when opening a channel - scriptSecurityManager changes (r=sicking,bholley) (03d83542d)
- Bug 1143922 - Add AsyncOpen2 to nsIChannel and perform security checks when opening a channel - media element changes (r=sicking,tanvi) (e0d73c36e)
- Bug 1182540 - Use channel->ascynOpen2 in dom/html/HTMLTrackElement.cpp (r=sicking) (c5eb0950d)
- Bug 1182537 - Use channel->ascynOpen2 in dom/base/Navigator.cpp (r=sicking,bz) (8721fd908)
- Bug 1182539 - Use channel->ascynOpen2 in dom/base/nsDocument.cpp (r=sicking) (6dcc65084)
- Bug 1182543 - Use channel->ascynOpen2 in dom/plugins/base/nsPluginHost.cpp (r=sicking) (341de1b91)
- Bug 1188637 - Use channel->ascynOpen2 in dom/base/EventSource.cpp (r=sicking) (e41da5e03)
- Bug 1167356 - Handle return value of DataSourceSurface::Map wherever possible. r=Bas (78286f883)
- missing uuid of 1089255 (c3790f3b5)
- Bug 1174307 - Add some internal content policy types for the purpose of reflecting them on RequestContext; r=sicking (93722c3e6)
- missing bit of Bug 1124951 (72545d143)
64 lines
2.1 KiB
C++
64 lines
2.1 KiB
C++
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
// vim: ft=cpp ts=8 sw=4 et tw=78
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#ifndef __nsContentPolicy_h__
|
|
#define __nsContentPolicy_h__
|
|
|
|
#include "nsIContentPolicy.h"
|
|
#include "nsISimpleContentPolicy.h"
|
|
#include "nsCategoryCache.h"
|
|
|
|
/*
|
|
* Implementation of the "@mozilla.org/layout/content-policy;1" contract.
|
|
*/
|
|
|
|
class nsContentPolicy : public nsIContentPolicy
|
|
{
|
|
public:
|
|
NS_DECL_ISUPPORTS
|
|
NS_DECL_NSICONTENTPOLICY
|
|
|
|
nsContentPolicy();
|
|
|
|
protected:
|
|
virtual ~nsContentPolicy();
|
|
|
|
private:
|
|
//Array of policies
|
|
nsCategoryCache<nsIContentPolicy> mPolicies;
|
|
nsCategoryCache<nsISimpleContentPolicy> mSimplePolicies;
|
|
|
|
//Helper type for CheckPolicy
|
|
typedef
|
|
NS_STDCALL_FUNCPROTO(nsresult, CPMethod, nsIContentPolicy,
|
|
ShouldProcess,
|
|
(uint32_t, nsIURI*, nsIURI*, nsISupports*,
|
|
const nsACString &, nsISupports*, nsIPrincipal*,
|
|
int16_t*));
|
|
|
|
typedef
|
|
NS_STDCALL_FUNCPROTO(nsresult, SCPMethod, nsISimpleContentPolicy,
|
|
ShouldProcess,
|
|
(uint32_t, nsIURI*, nsIURI*, nsIDOMElement*, bool,
|
|
const nsACString &, nsISupports*, nsIPrincipal*,
|
|
int16_t*));
|
|
|
|
//Helper method that applies policyMethod across all policies in mPolicies
|
|
// with the given parameters
|
|
nsresult CheckPolicy(CPMethod policyMethod, SCPMethod simplePolicyMethod,
|
|
nsContentPolicyType contentType,
|
|
nsIURI *aURI, nsIURI *origURI,
|
|
nsISupports *requestingContext,
|
|
const nsACString &mimeGuess, nsISupports *extra,
|
|
nsIPrincipal *requestPrincipal,
|
|
int16_t *decision);
|
|
};
|
|
|
|
nsresult
|
|
NS_NewContentPolicy(nsIContentPolicy **aResult);
|
|
|
|
#endif /* __nsContentPolicy_h__ */
|