本文整理汇总了C++中webcore::ResourceResponse::isNull方法的典型用法代码示例。如果您正苦于以下问题:C++ ResourceResponse::isNull方法的具体用法?C++ ResourceResponse::isNull怎么用?C++ ResourceResponse::isNull使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类webcore::ResourceResponse
的用法示例。
在下文中一共展示了ResourceResponse::isNull方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sharedWillSendRedirectedRequest
void NetworkResourceLoader::sharedWillSendRedirectedRequest(const WebCore::ResourceRequest& request, const WebCore::ResourceResponse& redirectResponse)
{
// We only expect to get the willSendRequest callback from ResourceHandle as the result of a redirect.
ASSERT(!redirectResponse.isNull());
ASSERT(RunLoop::isMain());
m_currentRequest = request;
#if ENABLE(NETWORK_CACHE)
WebCore::updateRedirectChainStatus(m_redirectChainCacheStatus, redirectResponse);
#endif
if (isSynchronous()) {
// FIXME: This needs to be fixed to follow the redirect correctly even for cross-domain requests.
// This includes at least updating host records, and comparing the current request instead of the original request here.
if (!protocolHostAndPortAreEqual(originalRequest().url(), m_currentRequest.url())) {
ASSERT(m_synchronousLoadData->error.isNull());
m_synchronousLoadData->error = SynchronousLoaderClient::platformBadResponseError();
m_currentRequest = ResourceRequest();
}
continueWillSendRequest(m_currentRequest);
return;
}
sendAbortingOnFailure(Messages::WebResourceLoader::WillSendRequest(m_currentRequest, redirectResponse));
}
示例2: dispatchWillSendRequest
void FrameLoaderClientQt::dispatchWillSendRequest(WebCore::DocumentLoader*, unsigned long identifier, WebCore::ResourceRequest& newRequest, const WebCore::ResourceResponse& redirectResponse)
{
if (dumpResourceLoadCallbacks)
printf("%s - willSendRequest %s redirectResponse %s\n",
qPrintable(dumpAssignedUrls[identifier]),
qPrintable(drtDescriptionSuitableForTestResult(newRequest)),
(redirectResponse.isNull()) ? "(null)" : qPrintable(drtDescriptionSuitableForTestResult(redirectResponse)));
if (sendRequestReturnsNull)
newRequest.setURL(QUrl());
if (sendRequestReturnsNullOnRedirect && !redirectResponse.isNull()) {
printf("Returning null for this redirect\n");
newRequest.setURL(QUrl());
}
for (int i = 0; i < sendRequestClearHeaders.size(); ++i)
newRequest.setHTTPHeaderField(sendRequestClearHeaders.at(i).toLocal8Bit().constData(), QString());
// seems like the Mac code doesn't do anything here by default neither
//qDebug() << "FrameLoaderClientQt::dispatchWillSendRequest" << request.isNull() << request.url().string`();
}