SchedulableLoader::SchedulableLoader(const NetworkResourceLoadParameters& parameters, NetworkConnectionToWebProcess* connection) : m_identifier(parameters.identifier()) , m_webPageID(parameters.webPageID()) , m_webFrameID(parameters.webFrameID()) , m_request(parameters.request()) , m_priority(parameters.priority()) , m_contentSniffingPolicy(parameters.contentSniffingPolicy()) , m_allowStoredCredentials(parameters.allowStoredCredentials()) , m_inPrivateBrowsingMode(parameters.inPrivateBrowsingMode()) , m_connection(connection) , m_shouldClearReferrerOnHTTPSToHTTPRedirect(parameters.shouldClearReferrerOnHTTPSToHTTPRedirect()) { for (size_t i = 0, count = parameters.requestBodySandboxExtensions().size(); i < count; ++i) { if (RefPtr<SandboxExtension> extension = SandboxExtension::create(parameters.requestBodySandboxExtensions()[i])) m_requestBodySandboxExtensions.append(extension); } #if ENABLE(BLOB) if (m_request.httpBody()) { const Vector<FormDataElement>& elements = m_request.httpBody()->elements(); for (size_t i = 0, count = elements.size(); i < count; ++i) { if (elements[i].m_type == FormDataElement::encodedBlob) { Vector<RefPtr<SandboxExtension> > blobElementExtensions = NetworkBlobRegistry::shared().sandboxExtensions(elements[i].m_url); m_requestBodySandboxExtensions.append(blobElementExtensions); } } } if (m_request.url().protocolIs("blob")) { ASSERT(!SandboxExtension::create(parameters.resourceSandboxExtension())); m_resourceSandboxExtensions = NetworkBlobRegistry::shared().sandboxExtensions(m_request.url()); } else #endif if (RefPtr<SandboxExtension> resourceSandboxExtension = SandboxExtension::create(parameters.resourceSandboxExtension())) m_resourceSandboxExtensions.append(resourceSandboxExtension); }
void NetworkConnectionToWebProcess::performSynchronousLoad(const NetworkResourceLoadParameters& loadParameters, PassRefPtr<Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad::DelayedReply> reply) { RefPtr<SyncNetworkResourceLoader> loader = SyncNetworkResourceLoader::create(loadParameters, this, reply); m_syncNetworkResourceLoaders.add(loadParameters.identifier(), loader); NetworkProcess::shared().networkResourceLoadScheduler().scheduleLoader(loader.get()); }
void NetworkConnectionToWebProcess::scheduleResourceLoad(const NetworkResourceLoadParameters& loadParameters) { RefPtr<NetworkResourceLoader> loader = NetworkResourceLoader::create(loadParameters, this); m_networkResourceLoaders.add(loadParameters.identifier(), loader); NetworkProcess::shared().networkResourceLoadScheduler().scheduleLoader(loader.get()); }