Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
DomainEntry Struct Reference
Collaboration diagram for DomainEntry:
Collaboration graph

List of all members.

Public Member Functions

 DomainEntry (const char *aOrigin, DomainPolicy *aDomainPolicy)
 ~DomainEntry ()
PRBool Matches (const char *anOrigin)

Public Attributes

nsCString mOrigin

Detailed Description

Definition at line 412 of file nsScriptSecurityManager.cpp.

Constructor & Destructor Documentation

DomainEntry::DomainEntry ( const char *  aOrigin,
DomainPolicy aDomainPolicy 
) [inline]

Definition at line 414 of file nsScriptSecurityManager.cpp.

                                             : mOrigin(aOrigin),

Here is the call graph for this function:

Definition at line 422 of file nsScriptSecurityManager.cpp.

Here is the call graph for this function:

Member Function Documentation

PRBool DomainEntry::Matches ( const char *  anOrigin) [inline]

Definition at line 427 of file nsScriptSecurityManager.cpp.

        int len = strlen(anOrigin);
        int thisLen = mOrigin.Length();
        if (len < thisLen)
            return PR_FALSE;
        if (mOrigin.RFindChar(':', thisLen-1, 1) != -1)
        //-- Policy applies to all URLs of this scheme, compare scheme only
            return mOrigin.EqualsIgnoreCase(anOrigin, thisLen);

        //-- Policy applies to a particular host; compare domains
        if (!mOrigin.Equals(anOrigin + (len - thisLen)))
            return PR_FALSE;
        if (len == thisLen)
            return PR_TRUE;
        char charBefore = anOrigin[len-thisLen-1];
        return (charBefore == '.' || charBefore == ':' || charBefore == '/');

Here is the caller graph for this function:

Member Data Documentation

Definition at line 447 of file nsScriptSecurityManager.cpp.

Definition at line 448 of file nsScriptSecurityManager.cpp.

Definition at line 446 of file nsScriptSecurityManager.cpp.

The documentation for this struct was generated from the following file: