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