content/base/src/nsChannelPolicy.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/content/base/src/nsChannelPolicy.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,36 @@
     1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#ifndef nsChannelPolicy_h___
    1.10 +#define nsChannelPolicy_h___
    1.11 +
    1.12 +#include "nsCOMPtr.h"
    1.13 +#include "nsIChannelPolicy.h"
    1.14 +
    1.15 +#define NSCHANNELPOLICY_CONTRACTID "@mozilla.org/nschannelpolicy;1"
    1.16 +#define NSCHANNELPOLICY_CID \
    1.17 +{ 0xd396b3cd, 0xf164, 0x4ce8, \
    1.18 +  { 0x93, 0xa7, 0xe3, 0x85, 0xe1, 0x46, 0x56, 0x3c } }
    1.19 +
    1.20 +class nsChannelPolicy : public nsIChannelPolicy
    1.21 +{
    1.22 +public:
    1.23 +    NS_DECL_ISUPPORTS
    1.24 +    NS_DECL_NSICHANNELPOLICY
    1.25 +
    1.26 +    nsChannelPolicy();
    1.27 +    virtual ~nsChannelPolicy();
    1.28 +
    1.29 +protected:
    1.30 +    /* Represents the type of content being loaded in the channel per
    1.31 +     * nsIContentPolicy, e.g. TYPE_IMAGE, TYPE_SCRIPT
    1.32 +     */
    1.33 +    unsigned long mLoadType;
    1.34 +
    1.35 +    /* pointer to a Content Security Policy object if available */
    1.36 +    nsCOMPtr<nsISupports> mCSP;
    1.37 +};
    1.38 +
    1.39 +#endif /* nsChannelPolicy_h___ */

mercurial