예제 #1
0
bool SecurityOrigin::canAccessCheckSuborigins(const SecurityOrigin* other) const
{
    if (hasSuborigin() != other->hasSuborigin())
        return false;

    if (hasSuborigin() && suboriginName() != other->suboriginName())
        return false;

    return canAccess(other);
}
예제 #2
0
void SecurityOrigin::buildRawString(StringBuilder& builder) const
{
    builder.append(m_protocol);
    builder.appendLiteral("://");
    if (hasSuborigin()) {
        builder.append(m_suboriginName);
        builder.appendLiteral("_");
    }
    builder.append(m_host);

    if (m_port) {
        builder.append(':');
        builder.appendNumber(m_port);
    }
}
예제 #3
0
void SecurityOrigin::buildRawString(StringBuilder& builder, bool includeSuborigin) const
{
    builder.append(m_protocol);
    builder.append("://");
    if (includeSuborigin && hasSuborigin()) {
        builder.append(m_suborigin.name());
        builder.append("_");
    }
    builder.append(m_host);

    if (m_port) {
        builder.append(':');
        builder.appendNumber(m_port);
    }
}
예제 #4
0
bool SecurityOrigin::canRequestNoSuborigin(const KURL& url) const
{
    return !hasSuborigin() && canRequest(url);
}
예제 #5
0
bool SecurityOrigin::isSameSchemeHostPortAndSuborigin(const SecurityOrigin* other) const
{
    bool sameSuborigins = (hasSuborigin() == other->hasSuborigin()) && (!hasSuborigin() || (suborigin()->name() == other->suborigin()->name()));
    return isSameSchemeHostPort(other) && sameSuborigins;
}
bool SecurityOrigin::isSameSchemeHostPortAndSuborigin(const SecurityOrigin* other) const
{
    return isSameSchemeHostPort(other) && (!hasSuborigin() || suboriginName() == other->suboriginName());
}