本文整理汇总了C++中AuthenticationChallenge::error方法的典型用法代码示例。如果您正苦于以下问题:C++ AuthenticationChallenge::error方法的具体用法?C++ AuthenticationChallenge::error怎么用?C++ AuthenticationChallenge::error使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AuthenticationChallenge
的用法示例。
在下文中一共展示了AuthenticationChallenge::error方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: compare
bool AuthenticationChallengeBase::compare(const AuthenticationChallenge& a, const AuthenticationChallenge& b)
{
if (a.isNull() && b.isNull())
return true;
if (a.isNull() || b.isNull())
return false;
if (a.protectionSpace() != b.protectionSpace())
return false;
if (a.proposedCredential() != b.proposedCredential())
return false;
if (a.previousFailureCount() != b.previousFailureCount())
return false;
if (a.failureResponse() != b.failureResponse())
return false;
if (a.error() != b.error())
return false;
return AuthenticationChallenge::platformCompare(a, b);
}
示例2:
void ArgumentCoder<AuthenticationChallenge>::encode(ArgumentEncoder* encoder, const AuthenticationChallenge& challenge)
{
encoder->encode(challenge.protectionSpace());
encoder->encode(challenge.proposedCredential());
encoder->encode(challenge.previousFailureCount());
encoder->encode(challenge.failureResponse());
encoder->encode(challenge.error());
}
示例3: createCF
CFURLAuthChallengeRef createCF(const AuthenticationChallenge& coreChallenge)
{
CFURLProtectionSpaceRef protectionSpace = createCF(coreChallenge.protectionSpace());
CFURLCredentialRef credential = createCF(coreChallenge.proposedCredential());
CFURLAuthChallengeRef result = CFURLAuthChallengeCreate(0, protectionSpace, credential,
coreChallenge.previousFailureCount(),
coreChallenge.failureResponse().cfURLResponse(),
coreChallenge.error());
CFRelease(protectionSpace);
CFRelease(credential);
return result;
}
示例4: PLATFORM
bool operator==(const AuthenticationChallenge& a, const AuthenticationChallenge& b)
{
if (a.isNull() != b.isNull())
return false;
if (a.isNull())
return true;
#if PLATFORM(MAC)
if (a.sender() != b.sender())
return false;
if (a.nsURLAuthenticationChallenge() != b.nsURLAuthenticationChallenge())
return false;
#elif USE(CFNETWORK)
if (a.sourceHandle() != b.sourceHandle())
return false;
if (a.cfURLAuthChallengeRef() != b.cfURLAuthChallengeRef())
return false;
#endif
if (a.protectionSpace() != b.protectionSpace())
return false;
if (a.proposedCredential() != b.proposedCredential())
return false;
if (a.previousFailureCount() != b.previousFailureCount())
return false;
if (a.failureResponse() != b.failureResponse())
return false;
if (a.error() != b.error())
return false;
return true;
}
示例5: createCF
CFURLAuthChallengeRef createCF(const AuthenticationChallenge& coreChallenge)
{
// FIXME: Why not cache CFURLAuthChallengeRef in m_cfChallenge? Foundation counterpart does that.
CFURLProtectionSpaceRef protectionSpace = createCF(coreChallenge.protectionSpace());
CFURLCredentialRef credential = createCF(coreChallenge.proposedCredential());
CFURLAuthChallengeRef result = CFURLAuthChallengeCreate(0, protectionSpace, credential,
coreChallenge.previousFailureCount(),
coreChallenge.failureResponse().cfURLResponse(),
coreChallenge.error());
CFRelease(protectionSpace);
CFRelease(credential);
return result;
}
示例6: receivedCredential
void ResourceHandle::receivedCredential(const AuthenticationChallenge& challenge, const Credential& credential)
{
ASSERT(!challenge.isNull());
if (challenge != d->m_currentWebChallenge)
return;
if (credential.isEmpty()) {
receivedRequestToContinueWithoutCredential(challenge);
return;
}
KURL urlToStore;
urlToStore = d->m_request.url();
CredentialStorage::set(credential, challenge.protectionSpace(), urlToStore);
clearAuthentication();
// Clone our ResourceHandle and add it so that it is send with the credential.
// FIXME: We should have a way of cloning an handle.
RefPtr<ResourceHandle> newHandle = ResourceHandle::create(request(), client(), 0, d->m_defersLoading, shouldContentSniff());
setClient(0); // Clear the client to avoid it being cleared by WebCore.
AuthenticationChallenge newAuthenticationChallenge(challenge.protectionSpace(), credential, challenge.previousFailureCount() + 1, challenge.failureResponse(), challenge.error());
// Store the new authentication challenge.
newHandle->getInternal()->m_currentWebChallenge = newAuthenticationChallenge;
d->m_cancelled = true;
}