当前位置: 首页>>代码示例>>C++>>正文


C++ webcore::ResourceError类代码示例

本文整理汇总了C++中webcore::ResourceError的典型用法代码示例。如果您正苦于以下问题:C++ ResourceError类的具体用法?C++ ResourceError怎么用?C++ ResourceError使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ResourceError类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: encodeResourceError

void encodeResourceError(ArgumentEncoder* encoder, const WebCore::ResourceError& resourceError)
{
    encoder->encode(CoreIPC::In(resourceError.domain(), resourceError.errorCode(), resourceError.failingURL(), resourceError.localizedDescription()));

#if USE(CFNETWORK)
    encoder->encode(WebKit::PlatformCertificateInfo(resourceError.certificate()));
#endif
}
开发者ID:,项目名称:,代码行数:8,代码来源:

示例2: dispatchDidFailLoad

void FrameLoaderClientQt::dispatchDidFailLoad(const WebCore::ResourceError& error)
{
    if (dumpFrameLoaderCallbacks)
        printf("%s - didFailLoadWithError\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)));

    m_loadError = error;
    if (!error.isNull() && !error.isCancellation())
        callErrorPageExtension(error);
}
开发者ID:Marforius,项目名称:qt,代码行数:9,代码来源:FrameLoaderClientQt.cpp

示例3: didFailURIRequest

void WebSoupRequestManager::didFailURIRequest(const WebCore::ResourceError& error, uint64_t requestID)
{
    WebSoupRequestAsyncData* data = m_requestMap.get(requestID);
    ASSERT(data);
    GRefPtr<GTask> task = data->releaseTask();
    ASSERT(task.get());

    g_task_return_new_error(task.get(), g_quark_from_string(error.domain().utf8().data()),
        error.errorCode(), "%s", error.localizedDescription().utf8().data());
    m_requestMap.remove(requestID);
}
开发者ID:JefferyJeffery,项目名称:webkit,代码行数:11,代码来源:WebSoupRequestManager.cpp

示例4: didFailWithError

void CustomProtocolManagerImpl::didFailWithError(uint64_t customProtocolID, const WebCore::ResourceError& error)
{
    WebSoupRequestAsyncData* data = m_customProtocolMap.get(customProtocolID);
    ASSERT(data);

    GRefPtr<GTask> task = data->releaseTask();
    ASSERT(task.get());
    g_task_return_new_error(task.get(), g_quark_from_string(error.domain().utf8().data()),
        error.errorCode(), "%s", error.localizedDescription().utf8().data());

    m_customProtocolMap.remove(customProtocolID);
}
开发者ID:cheekiatng,项目名称:webkit,代码行数:12,代码来源:CustomProtocolManagerImpl.cpp

示例5: didCompleteWithError

void NetworkResourceLoader::didCompleteWithError(const WebCore::ResourceError& error)
{
    if (error.isNull())
        sharedDidFinishLoading(WTF::monotonicallyIncreasingTime());
    else
        sharedDidFail(error);
}
开发者ID:xiaoyanzheng,项目名称:webkit,代码行数:7,代码来源:NetworkResourceLoader.cpp

示例6: callErrorPageExtension

void FrameLoaderClientQt::callErrorPageExtension(const WebCore::ResourceError& error)
{
    QWebPage* page = m_webFrame->page();
    if (page->supportsExtension(QWebPage::ErrorPageExtension)) {
        QWebPage::ErrorPageExtensionOption option;

        if (error.domain() == "QtNetwork")
            option.domain = QWebPage::QtNetwork;
        else if (error.domain() == "HTTP")
            option.domain = QWebPage::Http;
        else if (error.domain() == "WebKit")
            option.domain = QWebPage::WebKit;
        else
            return;

        option.url = QUrl(error.failingURL());
        option.frame = m_webFrame;
        option.error = error.errorCode();
        option.errorString = error.localizedDescription();

        QWebPage::ErrorPageExtensionReturn output;
        if (!page->extension(QWebPage::ErrorPageExtension, &option, &output))
            return;

        KURL baseUrl(output.baseUrl);
        KURL failingUrl(option.url);

        WebCore::ResourceRequest request(baseUrl);
        WTF::RefPtr<WebCore::SharedBuffer> buffer = WebCore::SharedBuffer::create(output.content.constData(), output.content.length());
        WebCore::SubstituteData substituteData(buffer, output.contentType, output.encoding, failingUrl);
        m_frame->loader()->load(request, substituteData, false);
    }
}
开发者ID:Marforius,项目名称:qt,代码行数:33,代码来源:FrameLoaderClientQt.cpp

示例7: sharedDidFail

void NetworkResourceLoader::sharedDidFail(const WebCore::ResourceError& error)
{
    ASSERT(!error.isNull());

#if ENABLE(NETWORK_CACHE)
    m_cacheEntryForValidation = nullptr;
#endif

    if (isSynchronous()) {
        m_synchronousLoadData->error = error;
        sendReplyToSynchronousRequest(*m_synchronousLoadData, nullptr);
    } else
        send(Messages::WebResourceLoader::DidFailResourceLoad(error));

    cleanup();
}
开发者ID:xiaoyanzheng,项目名称:webkit,代码行数:16,代码来源:NetworkResourceLoader.cpp

示例8: drtDescriptionSuitableForTestResult

static QString drtDescriptionSuitableForTestResult(const WebCore::ResourceError& error)
{
    QString failingURL = error.failingURL();
    return QString::fromLatin1("<NSError domain NSURLErrorDomain, code %1, failing URL \"%2\">").arg(error.errorCode()).arg(failingURL);
}
开发者ID:Marforius,项目名称:qt,代码行数:5,代码来源:FrameLoaderClientQt.cpp


注:本文中的webcore::ResourceError类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。