您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ willSendRequest函数代码示例

51自学网 2021-06-03 09:56:57
  C++
这篇教程C++ willSendRequest函数代码示例写得很实用,希望能帮到您。

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

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

示例1: ASSERT

bool ResourceLoader::load(const ResourceRequest& r){    ASSERT(!m_handle);    ASSERT(m_deferredRequest.isNull());    ASSERT(!frameLoader()->isArchiveLoadPending(this));        m_originalURL = r.url();        ResourceRequest clientRequest(r);    willSendRequest(clientRequest, ResourceResponse());    if (clientRequest.isNull()) {        didFail(frameLoader()->cancelledError(r));        return false;    }        if (frameLoader()->willUseArchive(this, clientRequest, m_originalURL))        return true;        if (m_defersLoading) {        m_deferredRequest = clientRequest;        return true;    }        m_handle = ResourceHandle::create(clientRequest, this, m_frame.get(), m_defersLoading, m_shouldContentSniff, true);    return true;}
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:27,


示例2: clientRequest

bool ResourceLoader::init(const ResourceRequest& r) {    ResourceRequest clientRequest(r);    willSendRequest(clientRequest, ResourceResponse());    m_request = clientRequest;    return true;}
开发者ID:faust93,项目名称:Notes,代码行数:7,


示例3: ASSERT

bool ResourceLoader::load(const ResourceRequest& r){    ASSERT(!m_handle);    ASSERT(m_deferredRequest.isNull());    ASSERT(!m_documentLoader->isSubstituteLoadPending(this));        ResourceRequest clientRequest(r);    willSendRequest(clientRequest, ResourceResponse());    if (clientRequest.isNull()) {        didFail(frameLoader()->cancelledError(r));        return false;    }        if (m_documentLoader->scheduleArchiveLoad(this, clientRequest, r.url()))        return true;    #if ENABLE(OFFLINE_WEB_APPLICATIONS)    if (m_documentLoader->applicationCacheHost()->maybeLoadResource(this, clientRequest, r.url()))        return true;#endif    if (m_defersLoading) {        m_deferredRequest = clientRequest;        return true;    }        m_handle = ResourceHandle::create(clientRequest, this, m_frame.get(), m_defersLoading, m_shouldContentSniff, true);    return true;}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:30,


示例4: ENABLE

void ResourceLoader::willSendRequest(ResourceHandle*, ResourceRequest& request, const ResourceResponse& redirectResponse){#if ENABLE(OFFLINE_WEB_APPLICATIONS)    if (documentLoader()->applicationCacheHost()->maybeLoadFallbackForRedirect(this, request, redirectResponse))        return;#endif    willSendRequest(request, redirectResponse);}
开发者ID:UIKit0,项目名称:WebkitAIR,代码行数:8,


示例5: ENABLE

void ResourceLoader::willSendRequest(ResourceHandle*, ResourceRequest& request, const ResourceResponse& redirectResponse){#if ENABLE(OFFLINE_WEB_APPLICATIONS)    if (!redirectResponse.isNull() && !protocolHostAndPortAreEqual(request.url(), redirectResponse.url())) {        if (scheduleLoadFallbackResourceFromApplicationCache())            return;    }#endif    willSendRequest(request, redirectResponse);}
开发者ID:Katarzynasrom,项目名称:patch-hosting-for-android-x86-support,代码行数:10,


示例6: ResourceError

void DocumentLoader::startLoadingMainResource(){    m_mainDocumentError = ResourceError();    timing()->markNavigationStart();    ASSERT(!m_mainResource);    ASSERT(!m_loadingMainResource);    m_loadingMainResource = true;    if (maybeLoadEmpty())        return;    ASSERT(timing()->navigationStart());    ASSERT(!timing()->fetchStart());    timing()->markFetchStart();    willSendRequest(m_request, ResourceResponse());    // willSendRequest() may lead to our Frame being detached or cancelling the load via nulling the ResourceRequest.    if (!m_frame || m_request.isNull())        return;    m_applicationCacheHost->willStartLoadingMainResource(m_request);    prepareSubframeArchiveLoadIfNeeded();    if (m_substituteData.isValid()) {        m_identifierForLoadWithoutResourceLoader = createUniqueIdentifier();        frameLoader()->notifier()->dispatchWillSendRequest(this, m_identifierForLoadWithoutResourceLoader, m_request, ResourceResponse());        handleSubstituteDataLoadSoon();        return;    }    ResourceRequest request(m_request);    DEFINE_STATIC_LOCAL(ResourceLoaderOptions, mainResourceLoadOptions,        (SendCallbacks, SniffContent, DoNotBufferData, AllowStoredCredentials, ClientRequestedCredentials, AskClientForCrossOriginCredentials, SkipSecurityCheck, CheckContentSecurityPolicy, UseDefaultOriginRestrictionsForType));    CachedResourceRequest cachedResourceRequest(request, cachedResourceRequestInitiators().document, mainResourceLoadOptions);    m_mainResource = m_cachedResourceLoader->requestMainResource(cachedResourceRequest);    if (!m_mainResource) {        setRequest(ResourceRequest());        // If the load was aborted by clearing m_request, it's possible the ApplicationCacheHost        // is now in a state where starting an empty load will be inconsistent. Replace it with        // a new ApplicationCacheHost.        m_applicationCacheHost = adoptPtr(new ApplicationCacheHost(this));        maybeLoadEmpty();        return;    }    m_mainResource->addClient(this);    // A bunch of headers are set when the underlying ResourceLoader is created, and m_request needs to include those.    if (mainResourceLoader())        request = mainResourceLoader()->originalRequest();    // If there was a fragment identifier on m_request, the cache will have stripped it. m_request should include    // the fragment identifier, so add that back in.    if (equalIgnoringFragmentIdentifier(m_request.url(), request.url()))        request.setURL(m_request.url());    setRequest(request);}
开发者ID:windyuuy,项目名称:opera,代码行数:55,


示例7: request

void ResourceFetcher::notifyLoadedFromMemoryCache(Resource* resource){    if (!frame() || !frame()->page() || resource->status() != Resource::Cached || m_validatedURLs.contains(resource->url()))        return;    ResourceRequest request(resource->url());    unsigned long identifier = createUniqueIdentifier();    context().dispatchDidLoadResourceFromMemoryCache(request, resource->response());    // FIXME: If willSendRequest changes the request, we don't respect it.    willSendRequest(identifier, request, ResourceResponse(), resource->options().initiatorInfo);    context().sendRemainingDelegateMessages(m_document, identifier, resource->response(), resource->encodedSize());}
开发者ID:greg100795,项目名称:mojo,代码行数:12,


示例8: ASSERT

void ContentFilter::redirectReceived(CachedResource* resource, ResourceRequest& request, const ResourceResponse& redirectResponse){    ASSERT(resource);    ASSERT(resource == m_mainResource);    ASSERT(m_state != State::Initialized);    if (m_state == State::Filtering)        willSendRequest(request, redirectResponse);    if (m_state != State::Blocked)        m_documentLoader.redirectReceived(resource, request, redirectResponse);}
开发者ID:hnney,项目名称:webkit,代码行数:12,


示例9: protect

void DocumentLoader::startLoadingMainResource(){    RefPtr<DocumentLoader> protect(this);    m_mainDocumentError = ResourceError();    timing()->markNavigationStart();    ASSERT(!m_mainResource);    ASSERT(!m_loadingMainResource);    m_loadingMainResource = true;    if (maybeLoadEmpty())        return;    ASSERT(timing()->navigationStart());    ASSERT(!timing()->fetchStart());    timing()->markFetchStart();    willSendRequest(m_request, ResourceResponse());    // willSendRequest() may lead to our LocalFrame being detached or cancelling the load via nulling the ResourceRequest.    if (!m_frame || m_request.isNull())        return;    m_applicationCacheHost->willStartLoadingMainResource(m_request);    prepareSubframeArchiveLoadIfNeeded();    ResourceRequest request(m_request);    DEFINE_STATIC_LOCAL(ResourceLoaderOptions, mainResourceLoadOptions,        (DoNotBufferData, AllowStoredCredentials, ClientRequestedCredentials, CheckContentSecurityPolicy, DocumentContext));    FetchRequest cachedResourceRequest(request, FetchInitiatorTypeNames::document, mainResourceLoadOptions);    m_mainResource = m_fetcher->fetchMainResource(cachedResourceRequest, m_substituteData);    if (!m_mainResource) {        m_request = ResourceRequest();        // If the load was aborted by clearing m_request, it's possible the ApplicationCacheHost        // is now in a state where starting an empty load will be inconsistent. Replace it with        // a new ApplicationCacheHost.        m_applicationCacheHost = ApplicationCacheHost::create(this);        maybeLoadEmpty();        return;    }    m_mainResource->addClient(this);    // A bunch of headers are set when the underlying ResourceLoader is created, and m_request needs to include those.    if (mainResourceLoader())        request = mainResourceLoader()->originalRequest();    // If there was a fragment identifier on m_request, the cache will have stripped it. m_request should include    // the fragment identifier, so add that back in.    if (equalIgnoringFragmentIdentifier(m_request.url(), request.url()))        request.setURL(m_request.url());    m_request = request;}
开发者ID:rzr,项目名称:blink-crosswalk,代码行数:49,


示例10: ASSERT

bool ResourceLoader::load(const ResourceRequest& r){    ASSERT(!m_handle);    ASSERT(m_deferredRequest.isNull());    ASSERT(!m_documentLoader->isSubstituteLoadPending(this));        ResourceRequest clientRequest(r);        // https://bugs.webkit.org/show_bug.cgi?id=26391    // The various plug-in implementations call directly to ResourceLoader::load() instead of piping requests    // through FrameLoader. As a result, they miss the FrameLoader::addExtraFieldsToRequest() step which sets    // up the 1st party for cookies URL. Until plug-in implementations can be reigned in to pipe through that    // method, we need to make sure there is always a 1st party for cookies set.    if (clientRequest.firstPartyForCookies().isNull()) {        if (Document* document = m_frame->document())            clientRequest.setFirstPartyForCookies(document->firstPartyForCookies());    }    willSendRequest(clientRequest, ResourceResponse());    if (clientRequest.isNull()) {        didFail(frameLoader()->cancelledError(r));        return false;    }        if (m_documentLoader->scheduleArchiveLoad(this, clientRequest, r.url()))        return true;    #if ENABLE(OFFLINE_WEB_APPLICATIONS)    if (m_documentLoader->applicationCacheHost()->maybeLoadResource(this, clientRequest, r.url()))        return true;    // Based on http://www.w3.org/TR/html5/offline.html, any urls listed in FALLBACK or NETWORK should bypass cache.    if (m_documentLoader->applicationCacheHost()->isFallbackOrNetworkResource(clientRequest.url()))        clientRequest.setCachePolicy(ReloadIgnoringCacheData);#endif    if (m_defersLoading) {        m_deferredRequest = clientRequest;        return true;    }        m_handle = ResourceHandle::create(m_frame->loader()->networkingContext(), clientRequest, this, m_defersLoading, m_shouldContentSniff);    return true;}
开发者ID:azrul2202,项目名称:WebKit-Smartphone,代码行数:45,


示例11: ASSERT_UNUSED

void DocumentLoader::redirectReceived(Resource* resource, ResourceRequest& request, const ResourceResponse& redirectResponse){    ASSERT_UNUSED(resource, resource == m_mainResource);    willSendRequest(request, redirectResponse);}
开发者ID:rzr,项目名称:blink-crosswalk,代码行数:5,


示例12: willSendRequest

void ResourceLoader::willSendRequest(ResourceHandle*, ResourceRequest& request, const ResourceResponse& redirectResponse){    willSendRequest(request, redirectResponse);}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:4,


示例13: willSendRequest

void ResourceLoader::willSendRequest(ResourceRequest&& request, const ResourceResponse& redirectResponse, std::function<void(ResourceRequest&)> callback){    willSendRequest(request, redirectResponse);    callback(request);}
开发者ID:clbr,项目名称:webkitfltk,代码行数:5,



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


C++ will_return函数代码示例
C++ willMutate函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。