michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: /* The privileged system principal. */ michael@0: michael@0: #ifndef nsSystemPrincipal_h__ michael@0: #define nsSystemPrincipal_h__ michael@0: michael@0: #include "nsIPrincipal.h" michael@0: #include "nsJSPrincipals.h" michael@0: michael@0: #define NS_SYSTEMPRINCIPAL_CID \ michael@0: { 0x4a6212db, 0xaccb, 0x11d3, \ michael@0: { 0xb7, 0x65, 0x0, 0x60, 0xb0, 0xb6, 0xce, 0xcb }} michael@0: #define NS_SYSTEMPRINCIPAL_CONTRACTID "@mozilla.org/systemprincipal;1" michael@0: michael@0: michael@0: class nsSystemPrincipal : public nsJSPrincipals michael@0: { michael@0: public: michael@0: // Our refcount is managed by nsJSPrincipals. Use this macro to avoid michael@0: // an extra refcount member. michael@0: NS_DECL_ISUPPORTS_INHERITED michael@0: NS_DECL_NSIPRINCIPAL michael@0: NS_DECL_NSISERIALIZABLE michael@0: michael@0: nsSystemPrincipal(); michael@0: michael@0: virtual void GetScriptLocation(nsACString &aStr) MOZ_OVERRIDE; michael@0: michael@0: #ifdef DEBUG michael@0: virtual void dumpImpl() MOZ_OVERRIDE; michael@0: #endif michael@0: michael@0: protected: michael@0: virtual ~nsSystemPrincipal(void); michael@0: michael@0: // XXX Probably unnecessary. See bug 143559. michael@0: NS_DECL_OWNINGTHREAD michael@0: }; michael@0: michael@0: #endif // nsSystemPrincipal_h__