beidson@apple.com | 12ab964 | 2012-11-14 19:43:42 +0000 | [diff] [blame] | 1 | /* |
ap@apple.com | cd1fa45 | 2013-03-26 21:27:45 +0000 | [diff] [blame] | 2 | * Copyright (C) 2012, 2013 Apple Inc. All rights reserved. |
beidson@apple.com | 12ab964 | 2012-11-14 19:43:42 +0000 | [diff] [blame] | 3 | * |
| 4 | * Redistribution and use in source and binary forms, with or without |
| 5 | * modification, are permitted provided that the following conditions |
| 6 | * are met: |
| 7 | * 1. Redistributions of source code must retain the above copyright |
| 8 | * notice, this list of conditions and the following disclaimer. |
| 9 | * 2. Redistributions in binary form must reproduce the above copyright |
| 10 | * notice, this list of conditions and the following disclaimer in the |
| 11 | * documentation and/or other materials provided with the distribution. |
| 12 | * |
| 13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' |
| 14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, |
| 15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS |
| 17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
| 23 | * THE POSSIBILITY OF SUCH DAMAGE. |
| 24 | */ |
| 25 | |
| 26 | #include "config.h" |
| 27 | #include "WebResourceLoader.h" |
| 28 | |
beidson@apple.com | aec2e29 | 2012-11-14 23:59:01 +0000 | [diff] [blame] | 29 | #include "DataReference.h" |
| 30 | #include "Logging.h" |
beidson@apple.com | aec2e29 | 2012-11-14 23:59:01 +0000 | [diff] [blame] | 31 | #include "NetworkProcessConnection.h" |
ap@apple.com | cd1fa45 | 2013-03-26 21:27:45 +0000 | [diff] [blame] | 32 | #include "NetworkResourceLoaderMessages.h" |
beidson@apple.com | aec2e29 | 2012-11-14 23:59:01 +0000 | [diff] [blame] | 33 | #include "WebCoreArgumentCoders.h" |
beidson@apple.com | 1bc450a | 2012-12-21 18:46:04 +0000 | [diff] [blame] | 34 | #include "WebErrors.h" |
beidson@apple.com | aec2e29 | 2012-11-14 23:59:01 +0000 | [diff] [blame] | 35 | #include "WebProcess.h" |
ap@apple.com | 178e91d | 2014-05-18 05:29:36 +0000 | [diff] [blame] | 36 | #include <WebCore/ApplicationCacheHost.h> |
ossy@webkit.org | 84c850d | 2013-12-12 12:30:58 +0000 | [diff] [blame] | 37 | #include <WebCore/CertificateInfo.h> |
andersca@apple.com | 0ab76de | 2013-04-22 22:56:19 +0000 | [diff] [blame] | 38 | #include <WebCore/DocumentLoader.h> |
ap@apple.com | 18ae25f | 2013-01-27 01:01:08 +0000 | [diff] [blame] | 39 | #include <WebCore/ResourceError.h> |
beidson@apple.com | 12ab964 | 2012-11-14 19:43:42 +0000 | [diff] [blame] | 40 | #include <WebCore/ResourceLoader.h> |
aestes@apple.com | 564640a | 2015-08-14 21:08:13 +0000 | [diff] [blame] | 41 | #include <WebCore/SubresourceLoader.h> |
beidson@apple.com | 12ab964 | 2012-11-14 19:43:42 +0000 | [diff] [blame] | 42 | |
| 43 | using namespace WebCore; |
| 44 | |
commit-queue@webkit.org | 6d63522 | 2016-03-08 06:44:59 +0000 | [diff] [blame] | 45 | #define WEBRESOURCELOADER_LOG_ALWAYS(...) LOG_ALWAYS(isAlwaysOnLoggingAllowed(), __VA_ARGS__) |
| 46 | |
beidson@apple.com | 12ab964 | 2012-11-14 19:43:42 +0000 | [diff] [blame] | 47 | namespace WebKit { |
| 48 | |
youenn.fablet@crf.canon.fr | 55144c5 | 2016-06-02 08:45:14 +0000 | [diff] [blame^] | 49 | Ref<WebResourceLoader> WebResourceLoader::create(Ref<ResourceLoader>&& coreLoader) |
beidson@apple.com | 12ab964 | 2012-11-14 19:43:42 +0000 | [diff] [blame] | 50 | { |
youenn.fablet@crf.canon.fr | 55144c5 | 2016-06-02 08:45:14 +0000 | [diff] [blame^] | 51 | return adoptRef(*new WebResourceLoader(WTFMove(coreLoader))); |
beidson@apple.com | 12ab964 | 2012-11-14 19:43:42 +0000 | [diff] [blame] | 52 | } |
| 53 | |
youenn.fablet@crf.canon.fr | 55144c5 | 2016-06-02 08:45:14 +0000 | [diff] [blame^] | 54 | WebResourceLoader::WebResourceLoader(Ref<WebCore::ResourceLoader>&& coreLoader) |
| 55 | : m_coreLoader(WTFMove(coreLoader)) |
beidson@apple.com | 12ab964 | 2012-11-14 19:43:42 +0000 | [diff] [blame] | 56 | { |
| 57 | } |
| 58 | |
| 59 | WebResourceLoader::~WebResourceLoader() |
| 60 | { |
| 61 | } |
| 62 | |
andersca@apple.com | 69388f0 | 2013-12-30 20:20:02 +0000 | [diff] [blame] | 63 | IPC::Connection* WebResourceLoader::messageSenderConnection() |
beidson@apple.com | 7fb049d | 2012-11-17 00:40:15 +0000 | [diff] [blame] | 64 | { |
cdumez@apple.com | 4faf1ef | 2015-01-30 20:49:33 +0000 | [diff] [blame] | 65 | return WebProcess::singleton().networkConnection()->connection(); |
beidson@apple.com | 7fb049d | 2012-11-17 00:40:15 +0000 | [diff] [blame] | 66 | } |
| 67 | |
andersca@apple.com | d4aa592 | 2013-05-25 00:17:20 +0000 | [diff] [blame] | 68 | uint64_t WebResourceLoader::messageSenderDestinationID() |
beidson@apple.com | 7fb049d | 2012-11-17 00:40:15 +0000 | [diff] [blame] | 69 | { |
| 70 | return m_coreLoader->identifier(); |
| 71 | } |
| 72 | |
beidson@apple.com | f8d6474 | 2013-03-29 23:02:28 +0000 | [diff] [blame] | 73 | void WebResourceLoader::detachFromCoreLoader() |
| 74 | { |
cdumez@apple.com | d839ea1 | 2015-07-04 19:42:18 +0000 | [diff] [blame] | 75 | m_coreLoader = nullptr; |
beidson@apple.com | f8d6474 | 2013-03-29 23:02:28 +0000 | [diff] [blame] | 76 | } |
| 77 | |
ap@apple.com | cd1fa45 | 2013-03-26 21:27:45 +0000 | [diff] [blame] | 78 | void WebResourceLoader::willSendRequest(const ResourceRequest& proposedRequest, const ResourceResponse& redirectResponse) |
beidson@apple.com | aec2e29 | 2012-11-14 23:59:01 +0000 | [diff] [blame] | 79 | { |
commit-queue@webkit.org | 6d63522 | 2016-03-08 06:44:59 +0000 | [diff] [blame] | 80 | LOG(Network, "(WebProcess) WebResourceLoader::willSendRequest to '%s'", proposedRequest.url().string().latin1().data()); |
| 81 | WEBRESOURCELOADER_LOG_ALWAYS("WebResourceLoader::willSendRequest, WebResourceLoader = %p", this); |
beidson@apple.com | f8d6474 | 2013-03-29 23:02:28 +0000 | [diff] [blame] | 82 | |
jpfau@apple.com | fb06c00 | 2014-12-02 04:28:25 +0000 | [diff] [blame] | 83 | RefPtr<WebResourceLoader> protect(this); |
ap@apple.com | 178e91d | 2014-05-18 05:29:36 +0000 | [diff] [blame] | 84 | |
ap@apple.com | cd1fa45 | 2013-03-26 21:27:45 +0000 | [diff] [blame] | 85 | ResourceRequest newRequest = proposedRequest; |
ap@apple.com | 178e91d | 2014-05-18 05:29:36 +0000 | [diff] [blame] | 86 | if (m_coreLoader->documentLoader()->applicationCacheHost()->maybeLoadFallbackForRedirect(m_coreLoader.get(), newRequest, redirectResponse)) |
| 87 | return; |
commit-queue@webkit.org | 0edb411 | 2014-09-11 17:20:18 +0000 | [diff] [blame] | 88 | // FIXME: Do we need to update NetworkResourceLoader clientCredentialPolicy in case loader policy is DoNotAskClientForCrossOriginCredentials? |
aestes@apple.com | 13aae08 | 2016-01-02 08:03:08 +0000 | [diff] [blame] | 89 | m_coreLoader->willSendRequest(WTFMove(newRequest), redirectResponse, [protect](ResourceRequest&& request) { |
jpfau@apple.com | fb06c00 | 2014-12-02 04:28:25 +0000 | [diff] [blame] | 90 | if (!protect->m_coreLoader) |
| 91 | return; |
| 92 | |
commit-queue@webkit.org | 599506b | 2015-08-04 20:48:47 +0000 | [diff] [blame] | 93 | protect->send(Messages::NetworkResourceLoader::ContinueWillSendRequest(request)); |
jpfau@apple.com | fb06c00 | 2014-12-02 04:28:25 +0000 | [diff] [blame] | 94 | }); |
beidson@apple.com | aec2e29 | 2012-11-14 23:59:01 +0000 | [diff] [blame] | 95 | } |
| 96 | |
ap@apple.com | 0c05506 | 2013-04-03 18:23:34 +0000 | [diff] [blame] | 97 | void WebResourceLoader::didSendData(uint64_t bytesSent, uint64_t totalBytesToBeSent) |
| 98 | { |
| 99 | m_coreLoader->didSendData(bytesSent, totalBytesToBeSent); |
| 100 | } |
| 101 | |
antti@apple.com | 6d2fe7d | 2014-09-09 08:19:16 +0000 | [diff] [blame] | 102 | void WebResourceLoader::didReceiveResponse(const ResourceResponse& response, bool needsContinueDidReceiveResponseMessage) |
beidson@apple.com | aec2e29 | 2012-11-14 23:59:01 +0000 | [diff] [blame] | 103 | { |
commit-queue@webkit.org | 6d63522 | 2016-03-08 06:44:59 +0000 | [diff] [blame] | 104 | LOG(Network, "(WebProcess) WebResourceLoader::didReceiveResponse for '%s'. Status %d.", m_coreLoader->url().string().latin1().data(), response.httpStatusCode()); |
| 105 | WEBRESOURCELOADER_LOG_ALWAYS("WebResourceLoader::didReceiveResponse, WebResourceLoader = %p, status = %d.", this, response.httpStatusCode()); |
andersca@apple.com | 028c073 | 2013-04-23 21:56:59 +0000 | [diff] [blame] | 106 | |
akling@apple.com | a34e522 | 2013-09-10 03:44:05 +0000 | [diff] [blame] | 107 | Ref<WebResourceLoader> protect(*this); |
andersca@apple.com | 028c073 | 2013-04-23 21:56:59 +0000 | [diff] [blame] | 108 | |
antti@apple.com | 6d2fe7d | 2014-09-09 08:19:16 +0000 | [diff] [blame] | 109 | if (m_coreLoader->documentLoader()->applicationCacheHost()->maybeLoadFallbackForResponse(m_coreLoader.get(), response)) |
ap@apple.com | 178e91d | 2014-05-18 05:29:36 +0000 | [diff] [blame] | 110 | return; |
aestes@apple.com | 08cc699 | 2014-08-05 17:49:44 +0000 | [diff] [blame] | 111 | |
antti@apple.com | 5ffeafc | 2014-10-20 17:17:32 +0000 | [diff] [blame] | 112 | bool shoudCallCoreLoaderDidReceiveResponse = true; |
aestes@apple.com | 08cc699 | 2014-08-05 17:49:44 +0000 | [diff] [blame] | 113 | #if USE(QUICK_LOOK) |
| 114 | // Refrain from calling didReceiveResponse if QuickLook will convert this response, since the MIME type of the |
| 115 | // converted resource isn't yet known. WebResourceLoaderQuickLookDelegate will later call didReceiveResponse upon |
| 116 | // receiving the converted data. |
cdumez@apple.com | 87da4e2 | 2016-04-18 15:36:34 +0000 | [diff] [blame] | 117 | bool isMainLoad = m_coreLoader->documentLoader()->mainResourceLoader() == m_coreLoader; |
| 118 | if (isMainLoad && QuickLookHandle::shouldCreateForMIMEType(response.mimeType())) { |
| 119 | m_coreLoader->documentLoader()->setQuickLookHandle(QuickLookHandle::create(*m_coreLoader, response)); |
antti@apple.com | 5ffeafc | 2014-10-20 17:17:32 +0000 | [diff] [blame] | 120 | shoudCallCoreLoaderDidReceiveResponse = false; |
| 121 | } |
aestes@apple.com | 08cc699 | 2014-08-05 17:49:44 +0000 | [diff] [blame] | 122 | #endif |
antti@apple.com | 5ffeafc | 2014-10-20 17:17:32 +0000 | [diff] [blame] | 123 | if (shoudCallCoreLoaderDidReceiveResponse) |
antti@apple.com | 6d2fe7d | 2014-09-09 08:19:16 +0000 | [diff] [blame] | 124 | m_coreLoader->didReceiveResponse(response); |
andersca@apple.com | 0ab76de | 2013-04-22 22:56:19 +0000 | [diff] [blame] | 125 | |
beidson@apple.com | 6b67733 | 2013-04-30 19:21:07 +0000 | [diff] [blame] | 126 | // If m_coreLoader becomes null as a result of the didReceiveResponse callback, we can't use the send function(). |
ap@apple.com | 63cec80 | 2013-04-29 18:08:57 +0000 | [diff] [blame] | 127 | if (!m_coreLoader) |
| 128 | return; |
| 129 | |
ap@apple.com | e251501 | 2013-04-28 03:22:55 +0000 | [diff] [blame] | 130 | if (needsContinueDidReceiveResponseMessage) |
andersca@apple.com | 0ab76de | 2013-04-22 22:56:19 +0000 | [diff] [blame] | 131 | send(Messages::NetworkResourceLoader::ContinueDidReceiveResponse()); |
beidson@apple.com | aec2e29 | 2012-11-14 23:59:01 +0000 | [diff] [blame] | 132 | } |
| 133 | |
andersca@apple.com | 69388f0 | 2013-12-30 20:20:02 +0000 | [diff] [blame] | 134 | void WebResourceLoader::didReceiveData(const IPC::DataReference& data, int64_t encodedDataLength) |
beidson@apple.com | aec2e29 | 2012-11-14 23:59:01 +0000 | [diff] [blame] | 135 | { |
commit-queue@webkit.org | 6d63522 | 2016-03-08 06:44:59 +0000 | [diff] [blame] | 136 | LOG(Network, "(WebProcess) WebResourceLoader::didReceiveData of size %lu for '%s'", data.size(), m_coreLoader->url().string().latin1().data()); |
| 137 | WEBRESOURCELOADER_LOG_ALWAYS("WebResourceLoader::didReceiveData, WebResourceLoader = %p, size = %lu", this, data.size()); |
commit-queue@webkit.org | 1cabcea | 2014-03-19 19:24:30 +0000 | [diff] [blame] | 138 | |
| 139 | #if USE(QUICK_LOOK) |
aestes@apple.com | 0661314 | 2014-08-07 00:16:36 +0000 | [diff] [blame] | 140 | if (QuickLookHandle* quickLookHandle = m_coreLoader->documentLoader()->quickLookHandle()) { |
| 141 | if (quickLookHandle->didReceiveData(adoptCF(CFDataCreate(kCFAllocatorDefault, data.data(), data.size())).get())) |
commit-queue@webkit.org | 1cabcea | 2014-03-19 19:24:30 +0000 | [diff] [blame] | 142 | return; |
| 143 | } |
| 144 | #endif |
beidson@apple.com | c289a14 | 2013-03-13 21:36:29 +0000 | [diff] [blame] | 145 | m_coreLoader->didReceiveData(reinterpret_cast<const char*>(data.data()), data.size(), encodedDataLength, DataPayloadBytes); |
beidson@apple.com | aec2e29 | 2012-11-14 23:59:01 +0000 | [diff] [blame] | 146 | } |
| 147 | |
| 148 | void WebResourceLoader::didFinishResourceLoad(double finishTime) |
| 149 | { |
commit-queue@webkit.org | 6d63522 | 2016-03-08 06:44:59 +0000 | [diff] [blame] | 150 | LOG(Network, "(WebProcess) WebResourceLoader::didFinishResourceLoad for '%s'", m_coreLoader->url().string().latin1().data()); |
| 151 | WEBRESOURCELOADER_LOG_ALWAYS("WebResourceLoader::didFinishResourceLoad, WebResourceLoader = %p", this); |
commit-queue@webkit.org | 1cabcea | 2014-03-19 19:24:30 +0000 | [diff] [blame] | 152 | |
| 153 | #if USE(QUICK_LOOK) |
aestes@apple.com | 0661314 | 2014-08-07 00:16:36 +0000 | [diff] [blame] | 154 | if (QuickLookHandle* quickLookHandle = m_coreLoader->documentLoader()->quickLookHandle()) { |
| 155 | if (quickLookHandle->didFinishLoading()) |
| 156 | return; |
| 157 | } |
commit-queue@webkit.org | 1cabcea | 2014-03-19 19:24:30 +0000 | [diff] [blame] | 158 | #endif |
beidson@apple.com | aec2e29 | 2012-11-14 23:59:01 +0000 | [diff] [blame] | 159 | m_coreLoader->didFinishLoading(finishTime); |
| 160 | } |
| 161 | |
| 162 | void WebResourceLoader::didFailResourceLoad(const ResourceError& error) |
| 163 | { |
commit-queue@webkit.org | 6d63522 | 2016-03-08 06:44:59 +0000 | [diff] [blame] | 164 | LOG(Network, "(WebProcess) WebResourceLoader::didFailResourceLoad for '%s'", m_coreLoader->url().string().latin1().data()); |
| 165 | WEBRESOURCELOADER_LOG_ALWAYS("WebResourceLoader::didFailResourceLoad, WebResourceLoader = %p", this); |
| 166 | |
commit-queue@webkit.org | 1cabcea | 2014-03-19 19:24:30 +0000 | [diff] [blame] | 167 | #if USE(QUICK_LOOK) |
aestes@apple.com | 0661314 | 2014-08-07 00:16:36 +0000 | [diff] [blame] | 168 | if (QuickLookHandle* quickLookHandle = m_coreLoader->documentLoader()->quickLookHandle()) |
| 169 | quickLookHandle->didFail(); |
commit-queue@webkit.org | 1cabcea | 2014-03-19 19:24:30 +0000 | [diff] [blame] | 170 | #endif |
ap@apple.com | 178e91d | 2014-05-18 05:29:36 +0000 | [diff] [blame] | 171 | if (m_coreLoader->documentLoader()->applicationCacheHost()->maybeLoadFallbackForError(m_coreLoader.get(), error)) |
| 172 | return; |
beidson@apple.com | aec2e29 | 2012-11-14 23:59:01 +0000 | [diff] [blame] | 173 | m_coreLoader->didFail(error); |
| 174 | } |
| 175 | |
ossy@webkit.org | b72e86c0 | 2013-10-10 15:35:02 +0000 | [diff] [blame] | 176 | #if ENABLE(SHAREABLE_RESOURCE) |
beidson@apple.com | aec2e29 | 2012-11-14 23:59:01 +0000 | [diff] [blame] | 177 | void WebResourceLoader::didReceiveResource(const ShareableResource::Handle& handle, double finishTime) |
| 178 | { |
commit-queue@webkit.org | 6d63522 | 2016-03-08 06:44:59 +0000 | [diff] [blame] | 179 | LOG(Network, "(WebProcess) WebResourceLoader::didReceiveResource for '%s'", m_coreLoader->url().string().latin1().data()); |
| 180 | WEBRESOURCELOADER_LOG_ALWAYS("WebResourceLoader::didReceiveResource, WebResourceLoader = %p", this); |
beidson@apple.com | aec2e29 | 2012-11-14 23:59:01 +0000 | [diff] [blame] | 181 | |
carlosgc@webkit.org | fc025bc | 2015-05-20 07:04:34 +0000 | [diff] [blame] | 182 | RefPtr<SharedBuffer> buffer = handle.tryWrapInSharedBuffer(); |
| 183 | |
aestes@apple.com | 425d314 | 2014-05-23 00:40:23 +0000 | [diff] [blame] | 184 | #if USE(QUICK_LOOK) |
aestes@apple.com | 0661314 | 2014-08-07 00:16:36 +0000 | [diff] [blame] | 185 | if (QuickLookHandle* quickLookHandle = m_coreLoader->documentLoader()->quickLookHandle()) { |
carlosgc@webkit.org | fc025bc | 2015-05-20 07:04:34 +0000 | [diff] [blame] | 186 | if (buffer) { |
| 187 | if (quickLookHandle->didReceiveData(buffer->existingCFData())) { |
aestes@apple.com | 0661314 | 2014-08-07 00:16:36 +0000 | [diff] [blame] | 188 | quickLookHandle->didFinishLoading(); |
aestes@apple.com | 425d314 | 2014-05-23 00:40:23 +0000 | [diff] [blame] | 189 | return; |
| 190 | } |
| 191 | } else |
aestes@apple.com | 0661314 | 2014-08-07 00:16:36 +0000 | [diff] [blame] | 192 | quickLookHandle->didFail(); |
aestes@apple.com | 425d314 | 2014-05-23 00:40:23 +0000 | [diff] [blame] | 193 | } |
| 194 | #endif |
| 195 | |
beidson@apple.com | 2130248 | 2013-03-22 00:14:03 +0000 | [diff] [blame] | 196 | if (!buffer) { |
| 197 | LOG_ERROR("Unable to create buffer from ShareableResource sent from the network process."); |
beidson@apple.com | 472f6d2 | 2013-03-18 18:05:26 +0000 | [diff] [blame] | 198 | m_coreLoader->didFail(internalError(m_coreLoader->request().url())); |
| 199 | return; |
| 200 | } |
beidson@apple.com | aec2e29 | 2012-11-14 23:59:01 +0000 | [diff] [blame] | 201 | |
akling@apple.com | a34e522 | 2013-09-10 03:44:05 +0000 | [diff] [blame] | 202 | Ref<WebResourceLoader> protect(*this); |
beidson@apple.com | f8d6474 | 2013-03-29 23:02:28 +0000 | [diff] [blame] | 203 | |
beidson@apple.com | aec2e29 | 2012-11-14 23:59:01 +0000 | [diff] [blame] | 204 | // Only send data to the didReceiveData callback if it exists. |
carlosgc@webkit.org | 9fb0c4f | 2016-03-01 17:42:35 +0000 | [diff] [blame] | 205 | if (unsigned bufferSize = buffer->size()) |
| 206 | m_coreLoader->didReceiveBuffer(buffer.release(), bufferSize, DataPayloadWholeResource); |
beidson@apple.com | aec2e29 | 2012-11-14 23:59:01 +0000 | [diff] [blame] | 207 | |
beidson@apple.com | f8d6474 | 2013-03-29 23:02:28 +0000 | [diff] [blame] | 208 | if (!m_coreLoader) |
| 209 | return; |
| 210 | |
beidson@apple.com | aec2e29 | 2012-11-14 23:59:01 +0000 | [diff] [blame] | 211 | m_coreLoader->didFinishLoading(finishTime); |
| 212 | } |
ossy@webkit.org | b72e86c0 | 2013-10-10 15:35:02 +0000 | [diff] [blame] | 213 | #endif |
beidson@apple.com | aec2e29 | 2012-11-14 23:59:01 +0000 | [diff] [blame] | 214 | |
ossy@webkit.org | ba31fed | 2013-09-17 08:20:21 +0000 | [diff] [blame] | 215 | #if USE(PROTECTION_SPACE_AUTH_CALLBACK) |
ap@apple.com | cd1fa45 | 2013-03-26 21:27:45 +0000 | [diff] [blame] | 216 | void WebResourceLoader::canAuthenticateAgainstProtectionSpace(const ProtectionSpace& protectionSpace) |
beidson@apple.com | 29824ff | 2012-11-19 19:22:48 +0000 | [diff] [blame] | 217 | { |
achristensen@apple.com | 5c468c5 | 2016-02-02 23:42:40 +0000 | [diff] [blame] | 218 | bool result = m_coreLoader ? m_coreLoader->canAuthenticateAgainstProtectionSpace(protectionSpace) : false; |
achristensen@apple.com | cba6fe9 | 2016-01-09 01:21:57 +0000 | [diff] [blame] | 219 | |
ap@apple.com | cd1fa45 | 2013-03-26 21:27:45 +0000 | [diff] [blame] | 220 | send(Messages::NetworkResourceLoader::ContinueCanAuthenticateAgainstProtectionSpace(result)); |
beidson@apple.com | 29824ff | 2012-11-19 19:22:48 +0000 | [diff] [blame] | 221 | } |
ossy@webkit.org | ba31fed | 2013-09-17 08:20:21 +0000 | [diff] [blame] | 222 | #endif |
beidson@apple.com | 29824ff | 2012-11-19 19:22:48 +0000 | [diff] [blame] | 223 | |
commit-queue@webkit.org | 6d63522 | 2016-03-08 06:44:59 +0000 | [diff] [blame] | 224 | bool WebResourceLoader::isAlwaysOnLoggingAllowed() const |
| 225 | { |
| 226 | return resourceLoader() && resourceLoader()->isAlwaysOnLoggingAllowed(); |
| 227 | } |
| 228 | |
beidson@apple.com | 12ab964 | 2012-11-14 19:43:42 +0000 | [diff] [blame] | 229 | } // namespace WebKit |