Bug 209475: Make nsIPermissionManager more flexible for extensions.

Changes nsIPermissionManager.idl to accept type strings rather than integers; this allows consumers to register unique types more easily, without fear of conflicting with an already-existing one.

Also fixes some bounds-checking fu (sr=bz on irc for those additional portions).

patch by mvl; r=dwitte, sr=bz.
This commit is contained in:
dwitte%stanford.edu 2005-11-15 21:50:28 +00:00
Родитель df1abe2c4e
Коммит 89963e4b77
1 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

@ -37,10 +37,13 @@ interface nsIPermission : nsISupports
readonly attribute AUTF8String host;
/**
* The type of permission (e.g., cookie, image, etc)
* (see nsIPermissionManager.idl for allowed values)
* a case-sensitive ASCII string, indicating the type of permission
* (e.g., "cookie", "image", etc).
* This string is specified by the consumer when adding a permission
* via nsIPermissionManager.
* @see nsIPermissionManager
*/
readonly attribute PRUint32 type;
readonly attribute ACString type;
/**
* The permission (see nsIPermissionManager.idl for allowed values)