2001-09-25 05:03:58 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* 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/. */
|
1999-11-12 01:10:36 +03:00
|
|
|
|
1999-09-01 04:54:35 +04:00
|
|
|
/* The privileged system principal. */
|
1999-11-12 01:10:36 +03:00
|
|
|
|
2003-10-22 02:11:49 +04:00
|
|
|
#ifndef nsSystemPrincipal_h__
|
|
|
|
#define nsSystemPrincipal_h__
|
1999-09-01 04:54:35 +04:00
|
|
|
|
2003-10-22 02:11:49 +04:00
|
|
|
#include "nsIPrincipal.h"
|
|
|
|
#include "nsJSPrincipals.h"
|
1999-09-01 04:54:35 +04:00
|
|
|
|
|
|
|
#define NS_SYSTEMPRINCIPAL_CID \
|
2000-01-06 03:59:18 +03:00
|
|
|
{ 0x4a6212db, 0xaccb, 0x11d3, \
|
|
|
|
{ 0xb7, 0x65, 0x0, 0x60, 0xb0, 0xb6, 0xce, 0xcb }}
|
2001-07-31 23:05:34 +04:00
|
|
|
#define NS_SYSTEMPRINCIPAL_CONTRACTID "@mozilla.org/systemprincipal;1"
|
2000-01-06 03:59:18 +03:00
|
|
|
|
1999-09-01 04:54:35 +04:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
class nsSystemPrincipal final : public nsJSPrincipals
|
2003-10-22 02:11:49 +04:00
|
|
|
{
|
1999-09-01 04:54:35 +04:00
|
|
|
public:
|
2012-03-09 13:48:50 +04:00
|
|
|
// Our refcount is managed by nsJSPrincipals. Use this macro to avoid
|
2006-04-03 00:58:26 +04:00
|
|
|
// an extra refcount member.
|
2003-10-22 02:11:49 +04:00
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
|
|
|
NS_DECL_NSIPRINCIPAL
|
2001-07-31 23:05:34 +04:00
|
|
|
NS_DECL_NSISERIALIZABLE
|
1999-11-12 01:10:36 +03:00
|
|
|
|
2000-03-21 07:05:35 +03:00
|
|
|
nsSystemPrincipal();
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual void GetScriptLocation(nsACString &aStr) override;
|
2012-03-09 13:48:50 +04:00
|
|
|
|
|
|
|
#ifdef DEBUG
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual void dumpImpl() override;
|
2012-03-09 13:48:50 +04:00
|
|
|
#endif
|
|
|
|
|
2003-10-22 02:11:49 +04:00
|
|
|
protected:
|
1999-09-01 04:54:35 +04:00
|
|
|
virtual ~nsSystemPrincipal(void);
|
2003-10-22 02:11:49 +04:00
|
|
|
|
|
|
|
// XXX Probably unnecessary. See bug 143559.
|
|
|
|
NS_DECL_OWNINGTHREAD
|
1999-09-01 04:54:35 +04:00
|
|
|
};
|
|
|
|
|
2003-10-22 02:11:49 +04:00
|
|
|
#endif // nsSystemPrincipal_h__
|