2001-09-25 05:03:58 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
|
|
|
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
1999-08-20 13:51:02 +04:00
|
|
|
*
|
2001-09-25 05:03:58 +04:00
|
|
|
* The contents of this file are subject to the Netscape Public License
|
|
|
|
* Version 1.1 (the "License"); you may not use this file except in
|
|
|
|
* compliance with the License. You may obtain a copy of the License at
|
|
|
|
* http://www.mozilla.org/NPL/
|
1999-08-20 13:51:02 +04:00
|
|
|
*
|
2001-09-25 05:03:58 +04:00
|
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* License.
|
1999-08-20 13:51:02 +04:00
|
|
|
*
|
1999-11-06 06:43:54 +03:00
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
2001-09-25 05:03:58 +04:00
|
|
|
* The Initial Developer of the Original Code is
|
|
|
|
* Netscape Communications Corporation.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 1998-2000
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
1999-11-06 06:43:54 +03:00
|
|
|
*
|
2001-09-25 05:03:58 +04:00
|
|
|
* Contributor(s):
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
|
|
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
|
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
* use your version of this file under the terms of the NPL, indicate your
|
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
|
|
|
* the terms of any one of the NPL, the GPL or the LGPL.
|
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
2000-02-10 07:56:56 +03:00
|
|
|
|
1999-08-20 13:51:02 +04:00
|
|
|
#ifndef _NS_SCRIPT_SECURITY_MANAGER_H_
|
|
|
|
#define _NS_SCRIPT_SECURITY_MANAGER_H_
|
|
|
|
|
|
|
|
#include "nsIScriptSecurityManager.h"
|
|
|
|
#include "nsIPrincipal.h"
|
|
|
|
#include "jsapi.h"
|
2000-04-14 07:14:53 +04:00
|
|
|
#include "jsdbgapi.h"
|
1999-09-07 06:54:19 +04:00
|
|
|
#include "nsIXPCSecurityManager.h"
|
1999-11-12 01:10:36 +03:00
|
|
|
#include "nsHashtable.h"
|
2000-01-19 00:54:01 +03:00
|
|
|
#include "nsCOMPtr.h"
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
#include "nsIPrefService.h"
|
2000-07-26 08:53:01 +04:00
|
|
|
#include "nsISecurityPref.h"
|
2000-08-22 10:02:14 +04:00
|
|
|
#include "nsIJSContextStack.h"
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
#include "nsIObserver.h"
|
2001-08-03 00:32:48 +04:00
|
|
|
#include "nsWeakPtr.h"
|
2000-08-22 10:02:14 +04:00
|
|
|
|
2001-03-23 07:22:56 +03:00
|
|
|
class nsIDocShell;
|
2001-04-17 05:21:44 +04:00
|
|
|
class nsString;
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
class nsIClassInfo;
|
2001-08-07 07:59:29 +04:00
|
|
|
class nsSystemPrincipal;
|
2001-03-23 07:22:56 +03:00
|
|
|
|
2000-03-21 07:05:35 +03:00
|
|
|
/////////////////////
|
|
|
|
// nsIPrincipalKey //
|
|
|
|
/////////////////////
|
|
|
|
|
|
|
|
class nsIPrincipalKey : public nsHashKey {
|
|
|
|
public:
|
|
|
|
nsIPrincipalKey(nsIPrincipal* key) {
|
|
|
|
mKey = key;
|
|
|
|
NS_IF_ADDREF(mKey);
|
|
|
|
}
|
|
|
|
|
|
|
|
~nsIPrincipalKey(void) {
|
|
|
|
NS_IF_RELEASE(mKey);
|
|
|
|
}
|
|
|
|
|
2000-08-10 10:19:37 +04:00
|
|
|
PRUint32 HashCode(void) const {
|
2000-03-21 07:05:35 +03:00
|
|
|
PRUint32 hash;
|
|
|
|
mKey->HashValue(&hash);
|
|
|
|
return hash;
|
|
|
|
}
|
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
PRBool Equals(const nsHashKey* aKey) const {
|
2000-03-21 07:05:35 +03:00
|
|
|
PRBool eq;
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
mKey->Equals(((nsIPrincipalKey*) aKey)->mKey, &eq);
|
2000-03-21 07:05:35 +03:00
|
|
|
return eq;
|
|
|
|
}
|
|
|
|
|
|
|
|
nsHashKey *Clone(void) const {
|
|
|
|
return new nsIPrincipalKey(mKey);
|
|
|
|
}
|
|
|
|
|
|
|
|
protected:
|
|
|
|
nsIPrincipal* mKey;
|
|
|
|
};
|
|
|
|
|
1999-08-20 13:51:02 +04:00
|
|
|
#define NS_SCRIPTSECURITYMANAGER_CID \
|
|
|
|
{ 0x7ee2a4c0, 0x4b93, 0x17d3, \
|
|
|
|
{ 0xba, 0x18, 0x00, 0x60, 0xb0, 0xf1, 0x99, 0xa2 }}
|
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
class nsScriptSecurityManager : public nsIScriptSecurityManager, public nsIObserver
|
1999-09-07 06:54:19 +04:00
|
|
|
{
|
1999-08-20 13:51:02 +04:00
|
|
|
public:
|
1999-08-30 01:58:42 +04:00
|
|
|
nsScriptSecurityManager();
|
|
|
|
virtual ~nsScriptSecurityManager();
|
|
|
|
|
|
|
|
NS_DEFINE_STATIC_CID_ACCESSOR(NS_SCRIPTSECURITYMANAGER_CID)
|
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISCRIPTSECURITYMANAGER
|
1999-09-07 06:54:19 +04:00
|
|
|
NS_DECL_NSIXPCSECURITYMANAGER
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
NS_DECL_NSIOBSERVER
|
2001-04-17 05:21:44 +04:00
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
static nsScriptSecurityManager*
|
1999-08-30 01:58:42 +04:00
|
|
|
GetScriptSecurityManager();
|
2000-08-22 10:02:14 +04:00
|
|
|
|
2001-08-07 07:59:29 +04:00
|
|
|
static nsSystemPrincipal*
|
|
|
|
SystemPrincipalSingletonConstructor();
|
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
JSContext* GetCurrentContextQuick();
|
2001-04-17 05:21:44 +04:00
|
|
|
|
1999-08-20 13:51:02 +04:00
|
|
|
private:
|
2000-01-19 00:54:01 +03:00
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
static PRBool IsDOMClass(nsIClassInfo* aClassInfo);
|
2001-03-23 07:22:56 +03:00
|
|
|
|
2001-08-03 00:32:48 +04:00
|
|
|
nsresult
|
|
|
|
GetBaseURIScheme(nsIURI* aURI, char** aScheme);
|
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
static nsresult
|
|
|
|
ReportErrorToConsole(nsIURI* aTarget);
|
2001-01-27 04:42:20 +03:00
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
nsresult
|
|
|
|
GetRootDocShell(JSContext* cx, nsIDocShell **result);
|
1999-08-30 01:58:42 +04:00
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
nsresult
|
|
|
|
CheckPropertyAccessImpl(PRUint32 aAction, nsIXPCNativeCallContext* aCallContext,
|
|
|
|
JSContext* aJSContext, JSObject* aJSObject,
|
2001-05-19 04:33:51 +04:00
|
|
|
nsISupports* aObj, nsIURI* aTargetURI,
|
|
|
|
nsIClassInfo* aClassInfo,
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
jsval aName, const char* aClassName,
|
2001-05-11 04:43:27 +04:00
|
|
|
const char* aProperty, void** aPolicy);
|
1999-08-30 01:58:42 +04:00
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
nsresult
|
|
|
|
CheckSameOrigin(JSContext* aCx, nsIPrincipal* aSubject,
|
2001-05-11 04:43:27 +04:00
|
|
|
nsIPrincipal* aObject, PRUint32 aAction);
|
2000-02-02 03:22:58 +03:00
|
|
|
|
1999-08-30 01:58:42 +04:00
|
|
|
PRInt32
|
2001-08-03 00:32:48 +04:00
|
|
|
GetSecurityLevel(nsIPrincipal *principal,
|
2001-05-19 04:33:51 +04:00
|
|
|
PRBool aIsDOM,
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
const char* aClassName, const char* aProperty,
|
|
|
|
PRUint32 aAction, nsCString &capability, void** aPolicy);
|
|
|
|
|
2001-08-29 06:05:48 +04:00
|
|
|
static nsresult
|
|
|
|
TryToGetPref(nsISecurityPref* aSecurityPref,
|
|
|
|
nsCString &aPrefName,
|
|
|
|
const char* aClassName,
|
|
|
|
const char* aPropertyName,
|
|
|
|
PRInt32 aClassPolicy,
|
|
|
|
PRUint32 aAction, char** result);
|
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
nsresult
|
2001-08-29 06:05:48 +04:00
|
|
|
GetPolicy(nsIPrincipal* principal,
|
|
|
|
const char* aClassName, const char* aPropertyName,
|
|
|
|
PRInt32 aClassPolicy, PRUint32 aAction, char** result);
|
1999-08-30 01:58:42 +04:00
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
nsresult
|
|
|
|
CreateCodebasePrincipal(nsIURI* aURI, nsIPrincipal** result);
|
|
|
|
|
|
|
|
nsresult
|
|
|
|
GetSubjectPrincipal(JSContext* aCx, nsIPrincipal** result);
|
1999-09-01 04:54:35 +04:00
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
nsresult
|
|
|
|
GetFramePrincipal(JSContext* cx, JSStackFrame* fp, nsIPrincipal** result);
|
2000-04-14 07:14:53 +04:00
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
nsresult
|
|
|
|
GetScriptPrincipal(JSContext* cx, JSScript* script, nsIPrincipal** result);
|
2000-04-14 07:14:53 +04:00
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
nsresult
|
|
|
|
GetFunctionObjectPrincipal(JSContext* cx, JSObject* obj,
|
|
|
|
nsIPrincipal** result);
|
2000-04-14 07:14:53 +04:00
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
nsresult
|
2001-05-11 04:43:27 +04:00
|
|
|
GetPrincipalAndFrame(JSContext *cx,
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
nsIPrincipal** result,
|
|
|
|
JSStackFrame** frameResult);
|
|
|
|
|
|
|
|
nsresult
|
2000-04-26 07:50:07 +04:00
|
|
|
SavePrincipal(nsIPrincipal* aToSave);
|
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
nsresult
|
2001-08-14 04:18:58 +04:00
|
|
|
CheckXPCPermissions(nsISupports* aObj,
|
|
|
|
const char* aObjectSecurityLevel);
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
|
|
|
|
nsresult
|
|
|
|
InitPrefs();
|
2000-11-30 08:32:08 +03:00
|
|
|
|
2000-05-16 07:40:51 +04:00
|
|
|
static nsresult
|
|
|
|
PrincipalPrefNames(const char* pref, char** grantedPref, char** deniedPref);
|
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
nsresult
|
2001-08-03 00:32:48 +04:00
|
|
|
InitPolicies(PRUint32 prefCount, const char** prefNames,
|
|
|
|
nsISecurityPref* securityPref);
|
1999-11-25 08:28:18 +03:00
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
nsresult
|
2001-08-03 00:32:48 +04:00
|
|
|
InitPrincipals(PRUint32 prefCount, const char** prefNames,
|
|
|
|
nsISecurityPref* securityPref);
|
2000-01-19 00:54:01 +03:00
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
inline void
|
2001-08-03 00:32:48 +04:00
|
|
|
JSEnabledPrefChanged(nsISecurityPref* aSecurityPref);
|
2000-01-06 03:59:18 +03:00
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
static const char* sJSEnabledPrefName;
|
|
|
|
static const char* sJSMailEnabledPrefName;
|
2000-02-10 07:56:56 +03:00
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
nsObjectHashtable* mOriginToPolicyMap;
|
|
|
|
nsHashtable* mClassPolicies;
|
2001-08-03 00:32:48 +04:00
|
|
|
nsWeakPtr mPrefBranchWeakRef;
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
nsIPrincipal* mSystemPrincipal;
|
2000-04-26 07:50:07 +04:00
|
|
|
nsCOMPtr<nsIPrincipal> mSystemCertificate;
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
nsSupportsHashtable* mPrincipals;
|
2000-01-06 03:59:18 +03:00
|
|
|
PRBool mIsJavaScriptEnabled;
|
2000-01-08 19:51:54 +03:00
|
|
|
PRBool mIsMailJavaScriptEnabled;
|
2000-07-20 05:16:15 +04:00
|
|
|
PRBool mIsWritingPrefs;
|
2000-08-22 10:02:14 +04:00
|
|
|
nsCOMPtr<nsIJSContextStack> mThreadJSContextStack;
|
2000-11-30 08:32:08 +03:00
|
|
|
PRBool mNameSetRegistered;
|
1999-10-29 02:09:03 +04:00
|
|
|
};
|
|
|
|
|
1999-08-20 13:51:02 +04:00
|
|
|
#endif /*_NS_SCRIPT_SECURITY_MANAGER_H_*/
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
|