Changeset 227364 in webkit


Ignore:
Timestamp:
Jan 22, 2018 2:28:44 PM (6 years ago)
Author:
achristensen@apple.com
Message:

Remove pre-NetworkSession loading code
https://bugs.webkit.org/show_bug.cgi?id=181944

Reviewed by Tim Horton.

We were keeping it around for El Capitan.

  • NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm:

(WebKit::LegacyCustomProtocolManager::registerProtocolClass):

  • NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.cpp:

(WebKit::LegacyCustomProtocolManager::initialize):

  • NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h:
  • NetworkProcess/Downloads/BlobDownloadClient.cpp: Removed.
  • NetworkProcess/Downloads/BlobDownloadClient.h: Removed.
  • NetworkProcess/Downloads/Download.cpp:

(WebKit::Download::~Download):
(WebKit::Download::cancel):
(WebKit::Download::didReceiveChallenge):
(WebKit::Download::didFinish):
(WebKit::Download::isAlwaysOnLoggingAllowed const):
(WebKit::Download::start): Deleted.
(WebKit::Download::startWithHandle): Deleted.
(WebKit::Download::didStart): Deleted.
(WebKit::Download::willSendRedirectedRequest): Deleted.
(WebKit::Download::didReceiveAuthenticationChallenge): Deleted.
(WebKit::Download::didReceiveResponse): Deleted.
(WebKit::Download::shouldDecodeSourceDataOfMIMEType): Deleted.
(WebKit::Download::decideDestinationWithSuggestedFilename): Deleted.
(WebKit::Download::decideDestinationWithSuggestedFilenameAsync): Deleted.
(WebKit::Download::didDecideDownloadDestination): Deleted.
(WebKit::Download::continueDidReceiveResponse): Deleted.

  • NetworkProcess/Downloads/Download.h:

(WebKit::Download::setBlobFileReferences): Deleted.
(WebKit::Download::request const): Deleted.

  • NetworkProcess/Downloads/DownloadManager.cpp:

(WebKit::DownloadManager::startDownload):
(WebKit::DownloadManager::willDecidePendingDownloadDestination):
(WebKit::DownloadManager::convertNetworkLoadToDownload):
(WebKit::DownloadManager::continueDecidePendingDownloadDestination):
(WebKit::DownloadManager::resumeDownload):
(WebKit::DownloadManager::cancelDownload):

  • NetworkProcess/Downloads/DownloadManager.h:

(WebKit::DownloadManager::startDownload):

  • NetworkProcess/Downloads/PendingDownload.cpp:
  • NetworkProcess/Downloads/PendingDownload.h:
  • NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
  • NetworkProcess/Downloads/ios/DownloadIOS.mm: Removed.
  • NetworkProcess/Downloads/mac/DownloadMac.mm: Removed.
  • NetworkProcess/NetworkCORSPreflightChecker.cpp:
  • NetworkProcess/NetworkCORSPreflightChecker.h:
  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::loadPing):

  • NetworkProcess/NetworkDataTask.cpp:
  • NetworkProcess/NetworkDataTask.h:
  • NetworkProcess/NetworkDataTaskBlob.cpp:
  • NetworkProcess/NetworkDataTaskBlob.h:
  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::~NetworkLoad):
(WebKit::NetworkLoad::setDefersLoading):
(WebKit::NetworkLoad::cancel):
(WebKit::NetworkLoad::continueWillSendRequest):
(WebKit::NetworkLoad::continueDidReceiveResponse):
(WebKit::NetworkLoad::shouldCaptureExtraNetworkLoadMetrics const):
(WebKit::NetworkLoad::didReceiveResponseAsync): Deleted.
(WebKit::NetworkLoad::didReceiveBuffer): Deleted.
(WebKit::NetworkLoad::didFinishLoading): Deleted.
(WebKit::NetworkLoad::didFail): Deleted.
(WebKit::NetworkLoad::willSendRequestAsync): Deleted.
(WebKit::NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync): Deleted.
(WebKit::NetworkLoad::shouldUseCredentialStorage): Deleted.
(WebKit::NetworkLoad::didReceiveAuthenticationChallenge): Deleted.
(WebKit::NetworkLoad::receivedCancellation): Deleted.

  • NetworkProcess/NetworkLoad.h:
  • NetworkProcess/NetworkLoadParameters.h:
  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::clearCachedCredentials):
(WebKit::NetworkProcess::findPendingDownloadLocation):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::startNetworkLoad):

  • NetworkProcess/NetworkSession.cpp:
  • NetworkProcess/NetworkSession.h:
  • NetworkProcess/PingLoad.cpp:
  • NetworkProcess/PingLoad.h:
  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:

(WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):

  • NetworkProcess/cocoa/NetworkSessionCocoa.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:
  • NetworkProcess/mac/NetworkLoadMac.mm: Removed.
  • NetworkProcess/mac/RemoteNetworkingContext.mm:

(WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):

  • Shared/Authentication/AuthenticationManager.cpp:

(WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
(WebKit::AuthenticationManager::useCredentialForSingleChallenge):
(WebKit::AuthenticationManager::continueWithoutCredentialForSingleChallenge):
(WebKit::AuthenticationManager::cancelSingleChallenge):
(WebKit::AuthenticationManager::performDefaultHandlingForSingleChallenge):
(WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge):

  • Shared/Authentication/AuthenticationManager.h:
  • Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm: Removed.
  • Shared/SessionTracker.cpp:

(WebKit::SessionTracker::setSession):
(WebKit::SessionTracker::destroySession):

  • Shared/SessionTracker.h:
  • Shared/mac/CookieStorageShim.h: Removed.
  • Shared/mac/CookieStorageShim.mm: Removed.
  • UIProcess/API/APIDownloadClient.h:

(API::DownloadClient::didReceiveData):
(API::DownloadClient::shouldDecodeSourceDataOfMIMEType): Deleted.

  • UIProcess/API/C/WKContext.cpp:

(WKContextSetDownloadClient):

  • UIProcess/Cocoa/DownloadClient.h:
  • UIProcess/Cocoa/DownloadClient.mm:

(WebKit::DownloadClient::shouldDecodeSourceDataOfMIMEType): Deleted.

  • UIProcess/Downloads/DownloadProxy.cpp:

(WebKit::DownloadProxy::willSendRequest):
(WebKit::DownloadProxy::didReceiveResponse):
(WebKit::DownloadProxy::shouldDecodeSourceDataOfMIMEType): Deleted.
(WebKit::DownloadProxy::decideDestinationWithSuggestedFilename): Deleted.

  • UIProcess/Downloads/DownloadProxy.h:
  • UIProcess/Downloads/DownloadProxy.messages.in:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:

(WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::clearCachedCredentials):

  • config.h:
Location:
trunk/Source/WebKit
Files:
8 deleted
52 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/CMakeLists.txt

    r227340 r227364  
    9797
    9898set(WebKit_SOURCES
    99     NetworkProcess/Downloads/BlobDownloadClient.cpp
    10099    NetworkProcess/Downloads/Download.cpp
    101100    NetworkProcess/Downloads/DownloadManager.cpp
  • trunk/Source/WebKit/ChangeLog

    r227358 r227364  
     12018-01-22  Alex Christensen  <achristensen@webkit.org>
     2
     3        Remove pre-NetworkSession loading code
     4        https://bugs.webkit.org/show_bug.cgi?id=181944
     5
     6        Reviewed by Tim Horton.
     7
     8        We were keeping it around for El Capitan.
     9
     10        * NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm:
     11        (WebKit::LegacyCustomProtocolManager::registerProtocolClass):
     12        * NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.cpp:
     13        (WebKit::LegacyCustomProtocolManager::initialize):
     14        * NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h:
     15        * NetworkProcess/Downloads/BlobDownloadClient.cpp: Removed.
     16        * NetworkProcess/Downloads/BlobDownloadClient.h: Removed.
     17        * NetworkProcess/Downloads/Download.cpp:
     18        (WebKit::Download::~Download):
     19        (WebKit::Download::cancel):
     20        (WebKit::Download::didReceiveChallenge):
     21        (WebKit::Download::didFinish):
     22        (WebKit::Download::isAlwaysOnLoggingAllowed const):
     23        (WebKit::Download::start): Deleted.
     24        (WebKit::Download::startWithHandle): Deleted.
     25        (WebKit::Download::didStart): Deleted.
     26        (WebKit::Download::willSendRedirectedRequest): Deleted.
     27        (WebKit::Download::didReceiveAuthenticationChallenge): Deleted.
     28        (WebKit::Download::didReceiveResponse): Deleted.
     29        (WebKit::Download::shouldDecodeSourceDataOfMIMEType): Deleted.
     30        (WebKit::Download::decideDestinationWithSuggestedFilename): Deleted.
     31        (WebKit::Download::decideDestinationWithSuggestedFilenameAsync): Deleted.
     32        (WebKit::Download::didDecideDownloadDestination): Deleted.
     33        (WebKit::Download::continueDidReceiveResponse): Deleted.
     34        * NetworkProcess/Downloads/Download.h:
     35        (WebKit::Download::setBlobFileReferences): Deleted.
     36        (WebKit::Download::request const): Deleted.
     37        * NetworkProcess/Downloads/DownloadManager.cpp:
     38        (WebKit::DownloadManager::startDownload):
     39        (WebKit::DownloadManager::willDecidePendingDownloadDestination):
     40        (WebKit::DownloadManager::convertNetworkLoadToDownload):
     41        (WebKit::DownloadManager::continueDecidePendingDownloadDestination):
     42        (WebKit::DownloadManager::resumeDownload):
     43        (WebKit::DownloadManager::cancelDownload):
     44        * NetworkProcess/Downloads/DownloadManager.h:
     45        (WebKit::DownloadManager::startDownload):
     46        * NetworkProcess/Downloads/PendingDownload.cpp:
     47        * NetworkProcess/Downloads/PendingDownload.h:
     48        * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
     49        * NetworkProcess/Downloads/ios/DownloadIOS.mm: Removed.
     50        * NetworkProcess/Downloads/mac/DownloadMac.mm: Removed.
     51        * NetworkProcess/NetworkCORSPreflightChecker.cpp:
     52        * NetworkProcess/NetworkCORSPreflightChecker.h:
     53        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
     54        (WebKit::NetworkConnectionToWebProcess::loadPing):
     55        * NetworkProcess/NetworkDataTask.cpp:
     56        * NetworkProcess/NetworkDataTask.h:
     57        * NetworkProcess/NetworkDataTaskBlob.cpp:
     58        * NetworkProcess/NetworkDataTaskBlob.h:
     59        * NetworkProcess/NetworkLoad.cpp:
     60        (WebKit::NetworkLoad::~NetworkLoad):
     61        (WebKit::NetworkLoad::setDefersLoading):
     62        (WebKit::NetworkLoad::cancel):
     63        (WebKit::NetworkLoad::continueWillSendRequest):
     64        (WebKit::NetworkLoad::continueDidReceiveResponse):
     65        (WebKit::NetworkLoad::shouldCaptureExtraNetworkLoadMetrics const):
     66        (WebKit::NetworkLoad::didReceiveResponseAsync): Deleted.
     67        (WebKit::NetworkLoad::didReceiveBuffer): Deleted.
     68        (WebKit::NetworkLoad::didFinishLoading): Deleted.
     69        (WebKit::NetworkLoad::didFail): Deleted.
     70        (WebKit::NetworkLoad::willSendRequestAsync): Deleted.
     71        (WebKit::NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync): Deleted.
     72        (WebKit::NetworkLoad::shouldUseCredentialStorage): Deleted.
     73        (WebKit::NetworkLoad::didReceiveAuthenticationChallenge): Deleted.
     74        (WebKit::NetworkLoad::receivedCancellation): Deleted.
     75        * NetworkProcess/NetworkLoad.h:
     76        * NetworkProcess/NetworkLoadParameters.h:
     77        * NetworkProcess/NetworkProcess.cpp:
     78        (WebKit::NetworkProcess::initializeNetworkProcess):
     79        (WebKit::NetworkProcess::clearCachedCredentials):
     80        (WebKit::NetworkProcess::findPendingDownloadLocation):
     81        * NetworkProcess/NetworkProcess.h:
     82        * NetworkProcess/NetworkProcess.messages.in:
     83        * NetworkProcess/NetworkResourceLoader.cpp:
     84        (WebKit::NetworkResourceLoader::startNetworkLoad):
     85        * NetworkProcess/NetworkSession.cpp:
     86        * NetworkProcess/NetworkSession.h:
     87        * NetworkProcess/PingLoad.cpp:
     88        * NetworkProcess/PingLoad.h:
     89        * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
     90        (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
     91        * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
     92        * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
     93        * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
     94        (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
     95        * NetworkProcess/cocoa/NetworkSessionCocoa.h:
     96        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
     97        * NetworkProcess/mac/NetworkLoadMac.mm: Removed.
     98        * NetworkProcess/mac/RemoteNetworkingContext.mm:
     99        (WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):
     100        * Shared/Authentication/AuthenticationManager.cpp:
     101        (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
     102        (WebKit::AuthenticationManager::useCredentialForSingleChallenge):
     103        (WebKit::AuthenticationManager::continueWithoutCredentialForSingleChallenge):
     104        (WebKit::AuthenticationManager::cancelSingleChallenge):
     105        (WebKit::AuthenticationManager::performDefaultHandlingForSingleChallenge):
     106        (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge):
     107        * Shared/Authentication/AuthenticationManager.h:
     108        * Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm: Removed.
     109        * Shared/SessionTracker.cpp:
     110        (WebKit::SessionTracker::setSession):
     111        (WebKit::SessionTracker::destroySession):
     112        * Shared/SessionTracker.h:
     113        * Shared/mac/CookieStorageShim.h: Removed.
     114        * Shared/mac/CookieStorageShim.mm: Removed.
     115        * UIProcess/API/APIDownloadClient.h:
     116        (API::DownloadClient::didReceiveData):
     117        (API::DownloadClient::shouldDecodeSourceDataOfMIMEType): Deleted.
     118        * UIProcess/API/C/WKContext.cpp:
     119        (WKContextSetDownloadClient):
     120        * UIProcess/Cocoa/DownloadClient.h:
     121        * UIProcess/Cocoa/DownloadClient.mm:
     122        (WebKit::DownloadClient::shouldDecodeSourceDataOfMIMEType): Deleted.
     123        * UIProcess/Downloads/DownloadProxy.cpp:
     124        (WebKit::DownloadProxy::willSendRequest):
     125        (WebKit::DownloadProxy::didReceiveResponse):
     126        (WebKit::DownloadProxy::shouldDecodeSourceDataOfMIMEType): Deleted.
     127        (WebKit::DownloadProxy::decideDestinationWithSuggestedFilename): Deleted.
     128        * UIProcess/Downloads/DownloadProxy.h:
     129        * UIProcess/Downloads/DownloadProxy.messages.in:
     130        * WebKit.xcodeproj/project.pbxproj:
     131        * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
     132        (WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession):
     133        * WebProcess/WebProcess.cpp:
     134        (WebKit::WebProcess::initializeWebProcess):
     135        (WebKit::WebProcess::clearCachedCredentials):
     136        * config.h:
     137
    11382018-01-22  Youenn Fablet  <youenn@apple.com>
    2139
  • trunk/Source/WebKit/NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm

    r220506 r227364  
    108108void LegacyCustomProtocolManager::registerProtocolClass()
    109109{
    110 #if !USE(NETWORK_SESSION)
    111     [NSURLProtocol registerClass:[WKCustomProtocol class]];
    112 #endif
    113 }
    114 
    115 #if USE(NETWORK_SESSION)
     110}
     111
    116112void LegacyCustomProtocolManager::registerProtocolClass(NSURLSessionConfiguration *configuration)
    117113{
    118114    configuration.protocolClasses = @[[WKCustomProtocol class]];
    119115}
    120 #endif
    121116
    122117void LegacyCustomProtocolManager::registerScheme(const String& scheme)
  • trunk/Source/WebKit/NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h

    r221743 r227364  
    9595    void stopLoading(uint64_t customProtocolID);
    9696
    97 #if PLATFORM(COCOA) && USE(NETWORK_SESSION)
     97#if PLATFORM(COCOA)
    9898    void registerProtocolClass(NSURLSessionConfiguration*);
    9999#endif
  • trunk/Source/WebKit/NetworkProcess/Downloads/Download.cpp

    r225926 r227364  
    2828
    2929#include "AuthenticationManager.h"
    30 #include "BlobDownloadClient.h"
    3130#include "Connection.h"
    3231#include "DataReference.h"
     
    5150namespace WebKit {
    5251
    53 #if USE(NETWORK_SESSION)
    5452Download::Download(DownloadManager& downloadManager, DownloadID downloadID, NetworkDataTask& download, const PAL::SessionID& sessionID, const String& suggestedName)
    5553    : m_downloadManager(downloadManager)
     
    6361    m_downloadManager.didCreateDownload();
    6462}
     63
    6564#if PLATFORM(COCOA)
    6665Download::Download(DownloadManager& downloadManager, DownloadID downloadID, NSURLSessionDownloadTask* download, const PAL::SessionID& sessionID, const String& suggestedName)
     
    7675}
    7776#endif
    78 #else
    79 Download::Download(DownloadManager& downloadManager, DownloadID downloadID, const ResourceRequest& request, const String& suggestedName)
    80     : m_downloadManager(downloadManager)
    81     , m_downloadID(downloadID)
    82     , m_request(request)
    83     , m_suggestedName(suggestedName)
    84 {
    85     ASSERT(m_downloadID.downloadID());
    86 
    87     m_downloadManager.didCreateDownload();
    88 }
    89 #endif // USE(NETWORK_SESSION)
    9077
    9178Download::~Download()
    9279{
    93 #if !USE(NETWORK_SESSION)
    94     for (auto& fileReference : m_blobFileReferences)
    95         fileReference->revokeFileAccess();
    96 
    97     if (m_resourceHandle) {
    98         m_resourceHandle->clearClient();
    99         m_resourceHandle->cancel();
    100         m_resourceHandle = nullptr;
    101     }
    102     m_downloadClient = nullptr;
    103 
    104     platformInvalidate();
    105 #endif
    106 
    10780    m_downloadManager.didDestroyDownload();
    10881}
    10982
    110 #if !USE(NETWORK_SESSION)
    111 void Download::start()
    112 {
    113     if (m_request.url().protocolIsBlob()) {
    114         m_downloadClient = std::make_unique<BlobDownloadClient>(*this);
    115         bool defersLoading = false;
    116         bool shouldContentSniff = false;
    117         bool shouldContentEncodingSniff = true;
    118         m_resourceHandle = ResourceHandle::create(nullptr, m_request, m_downloadClient.get(), defersLoading, shouldContentSniff, shouldContentEncodingSniff);
    119         didStart();
    120         return;
    121     }
    122 
    123     startNetworkLoad();
    124 }
    125 
    126 void Download::startWithHandle(ResourceHandle* handle, const ResourceResponse& response)
    127 {
    128     if (m_request.url().protocolIsBlob()) {
    129         m_downloadClient = std::make_unique<BlobDownloadClient>(*this);
    130         bool defersLoading = false;
    131         bool shouldContentSniff = false;
    132         bool shouldContentEncodingSniff = true;
    133         m_resourceHandle = ResourceHandle::create(nullptr, m_request, m_downloadClient.get(), defersLoading, shouldContentSniff, shouldContentEncodingSniff);
    134         didStart();
    135         return;
    136     }
    137 
    138     startNetworkLoadWithHandle(handle, response);
    139 }
    140 #endif
    141 
    14283void Download::cancel()
    14384{
    144 #if USE(NETWORK_SESSION)
    14585    if (m_download) {
    14686        m_download->cancel();
     
    14888        return;
    14989    }
    150 #else
    151     if (m_request.url().protocolIsBlob()) {
    152         auto resourceHandle = WTFMove(m_resourceHandle);
    153         resourceHandle->cancel();
    154         static_cast<BlobDownloadClient*>(m_downloadClient.get())->didCancel();
    155         return;
    156     }
    157 #endif
    15890    platformCancelNetworkLoad();
    15991}
    16092
    161 #if USE(NETWORK_SESSION)
    16293void Download::didReceiveChallenge(const WebCore::AuthenticationChallenge& challenge, ChallengeCompletionHandler&& completionHandler)
    16394{
     
    169100    NetworkProcess::singleton().authenticationManager().didReceiveAuthenticationChallenge(*this, challenge, WTFMove(completionHandler));
    170101}
    171 #endif // USE(NETWORK_SESSION)
    172 
    173 #if !USE(NETWORK_SESSION)
    174 void Download::didStart()
    175 {
    176     send(Messages::DownloadProxy::DidStart(m_request, m_suggestedName));
    177 }
    178 
    179 void Download::willSendRedirectedRequest(WebCore::ResourceRequest&& redirectRequest, WebCore::ResourceResponse&& redirectResponse)
    180 {
    181     send(Messages::DownloadProxy::WillSendRequest(WTFMove(redirectRequest), WTFMove(redirectResponse)));
    182 }
    183 
    184 void Download::didReceiveAuthenticationChallenge(const AuthenticationChallenge& authenticationChallenge)
    185 {
    186     m_downloadManager.downloadsAuthenticationManager().didReceiveAuthenticationChallenge(*this, authenticationChallenge);
    187 }
    188 
    189 void Download::didReceiveResponse(const ResourceResponse& response)
    190 {
    191     RELEASE_LOG_IF_ALLOWED("didReceiveResponse: Created (id = %" PRIu64 ")", downloadID().downloadID());
    192 
    193     m_responseMIMEType = response.mimeType();
    194     send(Messages::DownloadProxy::DidReceiveResponse(response));
    195 }
    196 
    197 bool Download::shouldDecodeSourceDataOfMIMEType(const String& mimeType)
    198 {
    199     bool result;
    200     if (!sendSync(Messages::DownloadProxy::ShouldDecodeSourceDataOfMIMEType(mimeType), Messages::DownloadProxy::ShouldDecodeSourceDataOfMIMEType::Reply(result)))
    201         return true;
    202 
    203     return result;
    204 }
    205 
    206 String Download::decideDestinationWithSuggestedFilename(const String& filename, bool& allowOverwrite)
    207 {
    208     String destination;
    209     SandboxExtension::Handle sandboxExtensionHandle;
    210     if (!sendSync(Messages::DownloadProxy::DecideDestinationWithSuggestedFilename(filename, m_responseMIMEType), Messages::DownloadProxy::DecideDestinationWithSuggestedFilename::Reply(destination, allowOverwrite, sandboxExtensionHandle)))
    211         return String();
    212 
    213     m_sandboxExtension = SandboxExtension::create(WTFMove(sandboxExtensionHandle));
    214     if (m_sandboxExtension)
    215         m_sandboxExtension->consume();
    216 
    217     return destination;
    218 }
    219 
    220 void Download::decideDestinationWithSuggestedFilenameAsync(const String& suggestedFilename)
    221 {
    222     send(Messages::DownloadProxy::DecideDestinationWithSuggestedFilenameAsync(downloadID(), suggestedFilename));
    223 }
    224 
    225 void Download::didDecideDownloadDestination(const String& destinationPath, SandboxExtension::Handle&& sandboxExtensionHandle, bool allowOverwrite)
    226 {
    227     ASSERT(!m_sandboxExtension);
    228     m_sandboxExtension = SandboxExtension::create(WTFMove(sandboxExtensionHandle));
    229     if (m_sandboxExtension)
    230         m_sandboxExtension->consume();
    231 
    232     if (m_request.url().protocolIsBlob()) {
    233         static_cast<BlobDownloadClient*>(m_downloadClient.get())->didDecideDownloadDestination(destinationPath, allowOverwrite);
    234         return;
    235     }
    236 
    237     // For now, only Blob URL downloads go through this code path.
    238     ASSERT_NOT_REACHED();
    239 }
    240 
    241 void Download::continueDidReceiveResponse()
    242 {
    243     m_resourceHandle->continueDidReceiveResponse();
    244 }
    245 #endif
    246102
    247103void Download::didCreateDestination(const String& path)
     
    263119{
    264120    RELEASE_LOG_IF_ALLOWED("didFinish: (id = %" PRIu64 ")", downloadID().downloadID());
    265 
    266 #if !USE(NETWORK_SESSION)
    267     platformDidFinish();
    268 #endif
    269121
    270122    send(Messages::DownloadProxy::DidFinish());
     
    317169bool Download::isAlwaysOnLoggingAllowed() const
    318170{
    319 #if USE(NETWORK_SESSION) && PLATFORM(COCOA)
     171#if PLATFORM(COCOA)
    320172    return m_sessionID.isAlwaysOnLoggingAllowed();
    321173#else
  • trunk/Source/WebKit/NetworkProcess/Downloads/Download.h

    r225926 r227364  
    2828#include "DownloadID.h"
    2929#include "MessageSender.h"
     30#include "NetworkDataTask.h"
    3031#include "SandboxExtension.h"
     32#include <WebCore/AuthenticationChallenge.h>
    3133#include <WebCore/ResourceHandle.h>
    3234#include <WebCore/ResourceHandleClient.h>
     
    3739#include <wtf/RetainPtr.h>
    3840
    39 #if USE(NETWORK_SESSION)
    40 #include "NetworkDataTask.h"
    41 #include <WebCore/AuthenticationChallenge.h>
    4241#if PLATFORM(COCOA)
    4342OBJC_CLASS NSURLSessionDownloadTask;
    4443#endif
    45 #else // USE(NETWORK_SESSION)
    46 #if PLATFORM(COCOA)
    47 OBJC_CLASS NSURLDownload;
    48 OBJC_CLASS WKDownloadAsDelegate;
    49 #endif
    50 #endif // USE(NETWORK_SESSION)
    5144
    5245namespace IPC {
     
    7467    WTF_MAKE_NONCOPYABLE(Download); WTF_MAKE_FAST_ALLOCATED;
    7568public:
    76 #if USE(NETWORK_SESSION)
    7769    Download(DownloadManager&, DownloadID, NetworkDataTask&, const PAL::SessionID& sessionID, const String& suggestedFilename = { });
    7870#if PLATFORM(COCOA)
    7971    Download(DownloadManager&, DownloadID, NSURLSessionDownloadTask*, const PAL::SessionID& sessionID, const String& suggestedFilename = { });
    8072#endif
    81 #else
    82     Download(DownloadManager&, DownloadID, const WebCore::ResourceRequest&, const String& suggestedFilename = { });
    83 #endif
    8473
    8574    ~Download();
    8675
    87 #if !USE(NETWORK_SESSION)
    88     void setBlobFileReferences(Vector<RefPtr<WebCore::BlobDataFileReference>>&& fileReferences) { m_blobFileReferences = WTFMove(fileReferences); }
    89 
    90     void start();
    91     void startWithHandle(WebCore::ResourceHandle*, const WebCore::ResourceResponse&);
    92 #endif
    9376    void resume(const IPC::DataReference& resumeData, const String& path, SandboxExtension::Handle&&);
    9477    void cancel();
     
    9780    const String& suggestedName() const { return m_suggestedName; }
    9881
    99 #if USE(NETWORK_SESSION)
    10082    void setSandboxExtension(RefPtr<SandboxExtension>&& sandboxExtension) { m_sandboxExtension = WTFMove(sandboxExtension); }
    10183    void didReceiveChallenge(const WebCore::AuthenticationChallenge&, ChallengeCompletionHandler&&);
    102 #else
    103     const WebCore::ResourceRequest& request() const { return m_request; }
    104     void didReceiveAuthenticationChallenge(const WebCore::AuthenticationChallenge&);
    105     void didStart();
    106     void willSendRedirectedRequest(WebCore::ResourceRequest&&, WebCore::ResourceResponse&&);
    107     void didReceiveResponse(const WebCore::ResourceResponse&);
    108     bool shouldDecodeSourceDataOfMIMEType(const String& mimeType);
    109     String decideDestinationWithSuggestedFilename(const String& filename, bool& allowOverwrite);
    110     void decideDestinationWithSuggestedFilenameAsync(const String&);
    111     void didDecideDownloadDestination(const String& destinationPath, SandboxExtension::Handle&&, bool allowOverwrite);
    112     void continueDidReceiveResponse();
    113     void platformDidFinish();
    114 #endif
    11584    void didCreateDestination(const String& path);
    11685    void didReceiveData(uint64_t length);
     
    12493    uint64_t messageSenderDestinationID() override;
    12594
    126 #if !USE(NETWORK_SESSION)
    127     void startNetworkLoad();
    128     void startNetworkLoadWithHandle(WebCore::ResourceHandle*, const WebCore::ResourceResponse&);
    129     void platformInvalidate();
    130 #endif
    13195    void platformCancelNetworkLoad();
    13296
     
    139103    RefPtr<SandboxExtension> m_sandboxExtension;
    140104
    141 #if USE(NETWORK_SESSION)
    142105    RefPtr<NetworkDataTask> m_download;
    143106#if PLATFORM(COCOA)
     
    145108#endif
    146109    PAL::SessionID m_sessionID;
    147 #else // USE(NETWORK_SESSION)
    148     WebCore::ResourceRequest m_request;
    149     String m_responseMIMEType;
    150 #if PLATFORM(COCOA)
    151     RetainPtr<NSURLDownload> m_nsURLDownload;
    152     RetainPtr<WKDownloadAsDelegate> m_delegate;
    153 #endif
    154     std::unique_ptr<WebCore::ResourceHandleClient> m_downloadClient;
    155     RefPtr<WebCore::ResourceHandle> m_resourceHandle;
    156 #endif // USE(NETWORK_SESSION)
    157110    String m_suggestedName;
    158111    bool m_hasReceivedData { false };
  • trunk/Source/WebKit/NetworkProcess/Downloads/DownloadManager.cpp

    r225926 r227364  
    4848void DownloadManager::startDownload(NetworkConnectionToWebProcess* connection, PAL::SessionID sessionID, DownloadID downloadID, const ResourceRequest& request, const String& suggestedName)
    4949{
    50 #if USE(NETWORK_SESSION)
    5150    auto* networkSession = SessionTracker::networkSession(sessionID);
    5251    if (!networkSession)
     
    6261
    6362    m_pendingDownloads.add(downloadID, std::make_unique<PendingDownload>(WTFMove(parameters), downloadID, *networkSession, suggestedName));
    64 #else
    65     auto download = std::make_unique<Download>(*this, downloadID, request, suggestedName);
    66     if (request.url().protocolIsBlob() && connection) {
    67         auto blobFileReferences = NetworkBlobRegistry::singleton().filesInBlob(*connection, request.url());
    68         for (auto& fileReference : blobFileReferences)
    69             fileReference->prepareForFileAccess();
    70         download->setBlobFileReferences(WTFMove(blobFileReferences));
    71     }
    72     download->start();
    73 
    74     ASSERT(!m_downloads.contains(downloadID));
    75     m_downloads.add(downloadID, WTFMove(download));
    76 #endif
    7763}
    7864
    79 #if USE(NETWORK_SESSION)
    8065void DownloadManager::dataTaskBecameDownloadTask(DownloadID downloadID, std::unique_ptr<Download>&& download)
    8166{
     
    10186    ASSERT_UNUSED(addResult, addResult.isNewEntry);
    10287}
    103 #endif // USE(NETWORK_SESSION)
    10488
    10589void DownloadManager::convertNetworkLoadToDownload(DownloadID downloadID, std::unique_ptr<NetworkLoad>&& networkLoad, Vector<RefPtr<WebCore::BlobDataFileReference>>&& blobFileReferences, const ResourceRequest& request, const ResourceResponse& response)
    10690{
    107 #if USE(NETWORK_SESSION)
    10891    ASSERT(!m_pendingDownloads.contains(downloadID));
    10992    m_pendingDownloads.add(downloadID, std::make_unique<PendingDownload>(WTFMove(networkLoad), downloadID, request, response));
    110 #else
    111     auto download = std::make_unique<Download>(*this, downloadID, request);
    112     download->setBlobFileReferences(WTFMove(blobFileReferences));
    113 
    114     auto* handle = networkLoad->handle();
    115     ASSERT(handle);
    116     download->startWithHandle(handle, response);
    117     ASSERT(!m_downloads.contains(downloadID));
    118     m_downloads.add(downloadID, WTFMove(download));
    119 
    120     // Unblock the URL connection operation queue.
    121     handle->continueDidReceiveResponse();
    122 #endif
    12393}
    12494
    12595void DownloadManager::continueDecidePendingDownloadDestination(DownloadID downloadID, String destination, SandboxExtension::Handle&& sandboxExtensionHandle, bool allowOverwrite)
    12696{
    127 #if USE(NETWORK_SESSION)
    12897    if (m_downloadsWaitingForDestination.contains(downloadID)) {
    12998        auto pair = m_downloadsWaitingForDestination.take(downloadID);
     
    147116        m_downloadsAfterDestinationDecided.set(downloadID, networkDataTask);
    148117    }
    149 #else
    150     if (auto* waitingDownload = download(downloadID))
    151         waitingDownload->didDecideDownloadDestination(destination, WTFMove(sandboxExtensionHandle), allowOverwrite);
    152 #endif
    153118}
    154119
    155120void DownloadManager::resumeDownload(PAL::SessionID sessionID, DownloadID downloadID, const IPC::DataReference& resumeData, const String& path, SandboxExtension::Handle&& sandboxExtensionHandle)
    156121{
    157 #if USE(NETWORK_SESSION) && !PLATFORM(COCOA)
     122#if !PLATFORM(COCOA)
    158123    notImplemented();
    159124#else
    160 #if USE(NETWORK_SESSION)
    161125    auto download = std::make_unique<Download>(*this, downloadID, nullptr, sessionID);
    162 #else
    163     // Download::resume() is responsible for setting the Download's resource request.
    164     auto download = std::make_unique<Download>(*this, downloadID, ResourceRequest());
    165 #endif
    166126
    167127    download->resume(resumeData, path, WTFMove(sandboxExtensionHandle));
     
    174134{
    175135    if (Download* download = m_downloads.get(downloadID)) {
    176 #if USE(NETWORK_SESSION)
    177136        ASSERT(!m_downloadsWaitingForDestination.contains(downloadID));
    178137        ASSERT(!m_pendingDownloads.contains(downloadID));
    179 #endif
    180138        download->cancel();
    181139        return;
    182140    }
    183 #if USE(NETWORK_SESSION)
    184141    auto pendingDownload = m_pendingDownloads.take(downloadID);
    185142    if (m_downloadsWaitingForDestination.contains(downloadID)) {
     
    198155    if (pendingDownload)
    199156        pendingDownload->cancel();
    200 #endif
    201157}
    202158
  • trunk/Source/WebKit/NetworkProcess/Downloads/DownloadManager.h

    r225926 r227364  
    7171        virtual IPC::Connection* downloadProxyConnection() = 0;
    7272        virtual AuthenticationManager& downloadsAuthenticationManager() = 0;
    73 #if USE(NETWORK_SESSION)
    7473        virtual void pendingDownloadCanceled(DownloadID) = 0;
    75 #endif
    7674    };
    7775
     
    7977
    8078    void startDownload(NetworkConnectionToWebProcess*, PAL::SessionID, DownloadID, const WebCore::ResourceRequest&, const String& suggestedName = { });
    81 #if USE(NETWORK_SESSION)
    8279    void dataTaskBecameDownloadTask(DownloadID, std::unique_ptr<Download>&&);
    8380    void continueWillSendRequest(DownloadID, WebCore::ResourceRequest&&);
    8481    void willDecidePendingDownloadDestination(NetworkDataTask&, ResponseCompletionHandler&&);
    85 #endif
    8682    void convertNetworkLoadToDownload(DownloadID, std::unique_ptr<NetworkLoad>&&, Vector<RefPtr<WebCore::BlobDataFileReference>>&&, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&);
    8783    void continueDecidePendingDownloadDestination(DownloadID, String destination, SandboxExtension::Handle&&, bool allowOverwrite);
     
    105101private:
    106102    Client& m_client;
    107 #if USE(NETWORK_SESSION)
    108103    HashMap<DownloadID, std::unique_ptr<PendingDownload>> m_pendingDownloads;
    109104    HashMap<DownloadID, std::pair<RefPtr<NetworkDataTask>, ResponseCompletionHandler>> m_downloadsWaitingForDestination;
    110105    HashMap<DownloadID, RefPtr<NetworkDataTask>> m_downloadsAfterDestinationDecided;
    111 #endif
    112106    HashMap<DownloadID, std::unique_ptr<Download>> m_downloads;
    113107};
  • trunk/Source/WebKit/NetworkProcess/Downloads/PendingDownload.cpp

    r224134 r227364  
    2626#include "config.h"
    2727#include "PendingDownload.h"
    28 
    29 #if USE(NETWORK_SESSION)
    3028
    3129#include "DataReference.h"
     
    102100   
    103101}
    104 
    105 #endif
  • trunk/Source/WebKit/NetworkProcess/Downloads/PendingDownload.h

    r224134 r227364  
    2424 */
    2525
    26 #ifndef PendingDownload_h
    27 #define PendingDownload_h
    28 
    29 #if USE(NETWORK_SESSION)
     26#pragma once
    3027
    3128#include "MessageSender.h"
     
    7673
    7774}
    78 
    79 #endif
    80 
    81 #endif
  • trunk/Source/WebKit/NetworkProcess/Downloads/cocoa/DownloadCocoa.mm

    r225926 r227364  
    2626#import "config.h"
    2727#import "Download.h"
    28 
    29 #if USE(NETWORK_SESSION)
    3028
    3129#import "DataReference.h"
     
    7573
    7674}
    77 
    78 #endif // USE(NETWORK_SESSION)
  • trunk/Source/WebKit/NetworkProcess/NetworkCORSPreflightChecker.cpp

    r222492 r227364  
    2626#include "config.h"
    2727#include "NetworkCORSPreflightChecker.h"
    28 
    29 #if USE(NETWORK_SESSION)
    3028
    3129#include "AuthenticationManager.h"
     
    134132
    135133} // Namespace WebKit
    136 
    137 #endif // USE(NETWORK_SESSION)
  • trunk/Source/WebKit/NetworkProcess/NetworkCORSPreflightChecker.h

    r222467 r227364  
    2525
    2626#pragma once
    27 
    28 #if USE(NETWORK_SESSION)
    2927
    3028#include "NetworkDataTask.h"
     
    7674
    7775} // namespace WebKit
    78 
    79 #endif // USE(NETWORK_SESSION)
  • trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp

    r226542 r227364  
    4444#include "NetworkSocketStream.h"
    4545#include "NetworkSocketStreamMessages.h"
     46#include "PingLoad.h"
    4647#include "PreconnectTask.h"
    4748#include "RemoteNetworkingContext.h"
     
    5859#include <pal/SessionID.h>
    5960
    60 #if USE(NETWORK_SESSION)
    61 #include "PingLoad.h"
    62 #endif
    63 
    6461using namespace WebCore;
    6562
     
    244241    };
    245242
    246 #if USE(NETWORK_SESSION)
    247243    // PingLoad manages its own lifetime, deleting itself when its purpose has been fulfilled.
    248244    new PingLoad(WTFMove(loadParameters), WTFMove(originalRequestHeaders), WTFMove(completionHandler));
    249 #else
    250     UNUSED_PARAM(originalRequestHeaders);
    251     auto context = RemoteNetworkingContext::create(loadParameters.sessionID, loadParameters.shouldClearReferrerOnHTTPSToHTTPRedirect);
    252 
    253     // PingHandle manages its own lifetime, deleting itself when its purpose has been fulfilled.
    254     new PingHandle(context.ptr(), loadParameters.request, loadParameters.storedCredentialsPolicy == StoredCredentialsPolicy::Use, loadParameters.shouldFollowRedirects, WTFMove(completionHandler));
    255 #endif
    256245}
    257246
  • trunk/Source/WebKit/NetworkProcess/NetworkDataTask.cpp

    r225827 r227364  
    2626#include "config.h"
    2727#include "NetworkDataTask.h"
    28 
    29 #if USE(NETWORK_SESSION)
    3028
    3129#include "NetworkDataTaskBlob.h"
     
    141139
    142140} // namespace WebKit
    143 
    144 #endif // USE(NETWORK_SESSION)
  • trunk/Source/WebKit/NetworkProcess/NetworkDataTask.h

    r225926 r227364  
    2525
    2626#pragma once
    27 
    28 #if USE(NETWORK_SESSION)
    2927
    3028#include "DownloadID.h"
     
    161159
    162160} // namespace WebKit
    163 
    164 #endif // USE(NETWORK_SESSION)
  • trunk/Source/WebKit/NetworkProcess/NetworkDataTaskBlob.cpp

    r225926 r227364  
    3333#include "NetworkDataTaskBlob.h"
    3434
    35 #if USE(NETWORK_SESSION)
    36 
    3735#include "DataReference.h"
    3836#include "Download.h"
     
    585583
    586584} // namespace WebKit
    587 
    588 #endif // USE(NETWORK_SESSION)
  • trunk/Source/WebKit/NetworkProcess/NetworkDataTaskBlob.h

    r225926 r227364  
    3131
    3232#pragma once
    33 
    34 #if USE(NETWORK_SESSION)
    3533
    3634#include "NetworkDataTask.h"
     
    121119
    122120} // namespace WebKit
    123 
    124 #endif // USE(NETWORK_SESSION)
  • trunk/Source/WebKit/NetworkProcess/NetworkLoad.cpp

    r224373 r227364  
    5454using namespace WebCore;
    5555
    56 #if USE(NETWORK_SESSION)
    57 
    5856struct NetworkLoad::Throttle {
    5957    Throttle(NetworkLoad& load, Seconds delay, ResourceResponse&& response, ResponseCompletionHandler&& handler)
     
    118116}
    119117
    120 #else
    121 
    122 NetworkLoad::NetworkLoad(NetworkLoadClient& client, NetworkLoadParameters&& parameters)
    123     : m_client(client)
    124     , m_parameters(WTFMove(parameters))
    125     , m_networkingContext(RemoteNetworkingContext::create(m_parameters.sessionID, m_parameters.shouldClearReferrerOnHTTPSToHTTPRedirect))
    126     , m_currentRequest(m_parameters.request)
    127 {
    128     m_handle = ResourceHandle::create(m_networkingContext.get(), m_parameters.request, this, m_parameters.defersLoading, m_parameters.contentSniffingPolicy == SniffContent, m_parameters.contentEncodingSniffingPolicy == ContentEncodingSniffingPolicy::Sniff);
    129 }
    130 
    131 #endif
    132 
    133118NetworkLoad::~NetworkLoad()
    134119{
     
    136121    if (m_redirectCompletionHandler)
    137122        m_redirectCompletionHandler({ });
    138 #if USE(NETWORK_SESSION)
    139123    if (m_responseCompletionHandler)
    140124        m_responseCompletionHandler(PolicyAction::Ignore);
     
    145129    if (m_task)
    146130        m_task->clearClient();
    147 #else
    148 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)
    149     if (m_handle && m_waitingForContinueCanAuthenticateAgainstProtectionSpace)
    150         m_handle->continueCanAuthenticateAgainstProtectionSpace(false);
    151 #endif
    152     if (m_handle)
    153         m_handle->clearClient();
    154 #endif
    155131}
    156132
    157133void NetworkLoad::setDefersLoading(bool defers)
    158134{
    159 #if USE(NETWORK_SESSION)
    160135    if (m_task) {
    161136        if (defers)
     
    169144        }
    170145    }
    171 #else
    172     if (m_handle)
    173         m_handle->setDefersLoading(defers);
    174 #endif
    175146}
    176147
    177148void NetworkLoad::cancel()
    178149{
    179 #if USE(NETWORK_SESSION)
    180150    if (m_task)
    181151        m_task->cancel();
    182 #else
    183     if (m_handle)
    184         m_handle->cancel();
    185 #endif
    186152}
    187153
     
    200166#endif
    201167
    202 #if USE(NETWORK_SESSION)
    203168    auto redirectCompletionHandler = std::exchange(m_redirectCompletionHandler, nullptr);
    204169    ASSERT(redirectCompletionHandler);
     
    213178    if (redirectCompletionHandler)
    214179        redirectCompletionHandler(ResourceRequest(m_currentRequest));
    215 #else
    216     if (m_currentRequest.isNull()) {
    217         if (m_handle)
    218             m_handle->cancel();
    219         didFail(m_handle.get(), cancelledError(m_currentRequest));
    220     } else if (m_handle) {
    221         auto currentRequestCopy = m_currentRequest;
    222         auto redirectCompletionHandler = std::exchange(m_redirectCompletionHandler, nullptr);
    223         ASSERT(redirectCompletionHandler);
    224         redirectCompletionHandler(WTFMove(currentRequestCopy));
    225     }
    226 #endif
    227180}
    228181
    229182void NetworkLoad::continueDidReceiveResponse()
    230183{
    231 #if USE(NETWORK_SESSION)
    232184    if (m_responseCompletionHandler) {
    233185        auto responseCompletionHandler = std::exchange(m_responseCompletionHandler, nullptr);
    234186        responseCompletionHandler(PolicyAction::Use);
    235187    }
    236 #else
    237     if (m_handle)
    238         m_handle->continueDidReceiveResponse();
    239 #endif
    240 }
    241 
    242 #if USE(NETWORK_SESSION)
     188}
     189
    243190bool NetworkLoad::shouldCaptureExtraNetworkLoadMetrics() const
    244191{
    245192    return m_client.get().shouldCaptureExtraNetworkLoadMetrics();
    246193}
    247 #endif
    248194
    249195NetworkLoadClient::ShouldContinueDidReceiveResponse NetworkLoad::sharedDidReceiveResponse(ResourceResponse&& response)
     
    276222    return m_client.get().isAllowedToAskUserForCredentials();
    277223}
    278 
    279 #if USE(NETWORK_SESSION)
    280224
    281225void NetworkLoad::convertTaskToDownload(PendingDownload& pendingDownload, const ResourceRequest& updatedRequest, const ResourceResponse& response)
     
    456400}
    457401
    458 #else
    459 
    460 void NetworkLoad::didReceiveResponseAsync(ResourceHandle* handle, ResourceResponse&& receivedResponse)
    461 {
    462     ASSERT_UNUSED(handle, handle == m_handle);
    463     if (sharedDidReceiveResponse(WTFMove(receivedResponse)) == NetworkLoadClient::ShouldContinueDidReceiveResponse::Yes)
    464         m_handle->continueDidReceiveResponse();
    465 }
    466 
    467 void NetworkLoad::didReceiveData(ResourceHandle*, const char* /* data */, unsigned /* length */, int /* encodedDataLength */)
    468 {
    469     // The NetworkProcess should never get a didReceiveData callback.
    470     // We should always be using didReceiveBuffer.
    471     ASSERT_NOT_REACHED();
    472 }
    473 
    474 void NetworkLoad::didReceiveBuffer(ResourceHandle* handle, Ref<SharedBuffer>&& buffer, int reportedEncodedDataLength)
    475 {
    476     ASSERT_UNUSED(handle, handle == m_handle);
    477     m_client.get().didReceiveBuffer(WTFMove(buffer), reportedEncodedDataLength);
    478 }
    479 
    480 void NetworkLoad::didFinishLoading(ResourceHandle* handle)
    481 {
    482     ASSERT_UNUSED(handle, handle == m_handle);
    483     NetworkLoadMetrics emptyMetrics;
    484     m_client.get().didFinishLoading(emptyMetrics);
    485 }
    486 
    487 void NetworkLoad::didFail(ResourceHandle* handle, const ResourceError& error)
    488 {
    489     ASSERT_UNUSED(handle, !handle || handle == m_handle);
    490     ASSERT(!error.isNull());
    491 
    492     m_client.get().didFailLoading(error);
    493 }
    494 
    495 void NetworkLoad::willSendRequestAsync(ResourceHandle* handle, ResourceRequest&& request, ResourceResponse&& redirectResponse, CompletionHandler<void(ResourceRequest&&)>&& completionHandler)
    496 {
    497     ASSERT(!m_redirectCompletionHandler);
    498     m_redirectCompletionHandler = WTFMove(completionHandler);
    499     ASSERT_UNUSED(handle, handle == m_handle);
    500     sharedWillSendRedirectedRequest(WTFMove(request), WTFMove(redirectResponse));
    501 }
    502 
    503 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)
    504 void NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync(ResourceHandle* handle, const ProtectionSpace& protectionSpace)
    505 {
    506     ASSERT(RunLoop::isMain());
    507     ASSERT_UNUSED(handle, handle == m_handle);
    508 
    509     // Handle server trust evaluation at platform-level if requested, for performance reasons.
    510     if (protectionSpace.authenticationScheme() == ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested
    511         && !NetworkProcess::singleton().canHandleHTTPSServerTrustEvaluation()) {
    512         continueCanAuthenticateAgainstProtectionSpace(false);
    513         return;
    514     }
    515 
    516     m_waitingForContinueCanAuthenticateAgainstProtectionSpace = true;
    517     m_client.get().canAuthenticateAgainstProtectionSpaceAsync(protectionSpace);
    518 }
    519 
    520 void NetworkLoad::continueCanAuthenticateAgainstProtectionSpace(bool result)
    521 {
    522     m_waitingForContinueCanAuthenticateAgainstProtectionSpace = false;
    523     if (m_handle)
    524         m_handle->continueCanAuthenticateAgainstProtectionSpace(result);
    525 }
    526 #endif
    527 
    528 void NetworkLoad::didSendData(ResourceHandle* handle, unsigned long long bytesSent, unsigned long long totalBytesToBeSent)
    529 {
    530     ASSERT_UNUSED(handle, handle == m_handle);
    531 
    532     m_client.get().didSendData(bytesSent, totalBytesToBeSent);
    533 }
    534 
    535 void NetworkLoad::wasBlocked(ResourceHandle* handle)
    536 {
    537     ASSERT_UNUSED(handle, handle == m_handle);
    538 
    539     didFail(handle, WebKit::blockedError(m_currentRequest));
    540 }
    541 
    542 void NetworkLoad::cannotShowURL(ResourceHandle* handle)
    543 {
    544     ASSERT_UNUSED(handle, handle == m_handle);
    545 
    546     didFail(handle, WebKit::cannotShowURLError(m_currentRequest));
    547 }
    548 
    549 bool NetworkLoad::shouldUseCredentialStorage(ResourceHandle* handle)
    550 {
    551     ASSERT_UNUSED(handle, handle == m_handle || !m_handle); // m_handle will be 0 if called from ResourceHandle::start().
    552 
    553     // When the WebProcess is handling loading a client is consulted each time this shouldUseCredentialStorage question is asked.
    554     // In NetworkProcess mode we ask the WebProcess client up front once and then reuse the cached answer.
    555 
    556     // We still need this sync version, because ResourceHandle itself uses it internally, even when the delegate uses an async one.
    557 
    558     return m_parameters.storedCredentialsPolicy == StoredCredentialsPolicy::Use;
    559 }
    560 
    561 void NetworkLoad::didReceiveAuthenticationChallenge(ResourceHandle* handle, const AuthenticationChallenge& challenge)
    562 {
    563     ASSERT_UNUSED(handle, handle == m_handle);
    564 
    565     if (!isAllowedToAskUserForCredentials()) {
    566         challenge.authenticationClient()->receivedRequestToContinueWithoutCredential(challenge);
    567         return;
    568     }
    569 
    570     NetworkProcess::singleton().authenticationManager().didReceiveAuthenticationChallenge(m_parameters.webPageID, m_parameters.webFrameID, challenge);
    571 }
    572 
    573 void NetworkLoad::receivedCancellation(ResourceHandle* handle, const AuthenticationChallenge&)
    574 {
    575     ASSERT_UNUSED(handle, handle == m_handle);
    576 
    577     m_handle->cancel();
    578     didFail(m_handle.get(), cancelledError(m_currentRequest));
    579 }
    580 #endif // USE(NETWORK_SESSION)
    581 
    582402} // namespace WebKit
  • trunk/Source/WebKit/NetworkProcess/NetworkLoad.h

    r224828 r227364  
    2626#pragma once
    2727
     28#include "DownloadID.h"
     29#include "NetworkDataTask.h"
    2830#include "NetworkLoadClient.h"
    2931#include "NetworkLoadParameters.h"
    3032#include "RemoteNetworkingContext.h"
     33#include <WebCore/AuthenticationChallenge.h>
    3134#include <WebCore/ResourceHandleClient.h>
    3235#include <wtf/CompletionHandler.h>
    3336#include <wtf/Optional.h>
    34 
    35 #if USE(NETWORK_SESSION)
    36 #include "DownloadID.h"
    37 #include "NetworkDataTask.h"
    38 #include <WebCore/AuthenticationChallenge.h>
    39 #endif
    4037
    4138#if ENABLE(NETWORK_CAPTURE)
     
    4643namespace WebKit {
    4744
    48 class NetworkLoad final :
    49 #if USE(NETWORK_SESSION)
    50     private NetworkDataTaskClient
    51 #else
    52     private WebCore::ResourceHandleClient
    53 #endif
     45class NetworkLoad final : private NetworkDataTaskClient
    5446{
    5547    WTF_MAKE_FAST_ALLOCATED;
    5648public:
    57 #if USE(NETWORK_SESSION)
    5849    NetworkLoad(NetworkLoadClient&, NetworkLoadParameters&&, NetworkSession&);
    59 #else
    60     NetworkLoad(NetworkLoadClient&, NetworkLoadParameters&&);
    61 #endif
    6250    ~NetworkLoad();
    6351
     
    7563    void continueDidReceiveResponse();
    7664
    77 #if USE(NETWORK_SESSION)
    7865    void convertTaskToDownload(PendingDownload&, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&);
    7966    void setPendingDownloadID(DownloadID);
     
    8370
    8471    bool shouldCaptureExtraNetworkLoadMetrics() const final;
    85 #else
    86     WebCore::ResourceHandle* handle() const { return m_handle.get(); }
    87 
    88 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)
    89     void canAuthenticateAgainstProtectionSpaceAsync(WebCore::ResourceHandle*, const WebCore::ProtectionSpace&) override;
    90 #endif
    91 #if PLATFORM(COCOA)
    92     void willCacheResponseAsync(WebCore::ResourceHandle*, NSCachedURLResponse *) override;
    93 #endif
    94 #endif // USE(NETWORK_SESSION)
    9572
    9673#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
     
    9976
    10077private:
    101 #if USE(NETWORK_SESSION)
    10278#if ENABLE(NETWORK_CAPTURE)
    10379    void initializeForRecord(NetworkSession&);
     
    10581#endif
    10682    void initialize(NetworkSession&);
    107 #endif
    10883
    10984    NetworkLoadClient::ShouldContinueDidReceiveResponse sharedDidReceiveResponse(WebCore::ResourceResponse&&);
    11085    void sharedWillSendRedirectedRequest(WebCore::ResourceRequest&&, WebCore::ResourceResponse&&);
    11186
    112 #if !USE(NETWORK_SESSION)
    113     // ResourceHandleClient
    114     void willSendRequestAsync(WebCore::ResourceHandle*, WebCore::ResourceRequest&&, WebCore::ResourceResponse&& redirectResponse, CompletionHandler<void(WebCore::ResourceRequest&&)>&&) final;
    115     void didSendData(WebCore::ResourceHandle*, unsigned long long bytesSent, unsigned long long totalBytesToBeSent) final;
    116     void didReceiveResponseAsync(WebCore::ResourceHandle*, WebCore::ResourceResponse&&) final;
    117     void didReceiveData(WebCore::ResourceHandle*, const char*, unsigned, int encodedDataLength) final;
    118     void didReceiveBuffer(WebCore::ResourceHandle*, Ref<WebCore::SharedBuffer>&&, int reportedEncodedDataLength) final;
    119     void didFinishLoading(WebCore::ResourceHandle*) final;
    120     void didFail(WebCore::ResourceHandle*, const WebCore::ResourceError&) final;
    121     void wasBlocked(WebCore::ResourceHandle*) final;
    122     void cannotShowURL(WebCore::ResourceHandle*) final;
    123     bool shouldUseCredentialStorage(WebCore::ResourceHandle*) final;
    124     void didReceiveAuthenticationChallenge(WebCore::ResourceHandle*, const WebCore::AuthenticationChallenge&) final;
    125     void receivedCancellation(WebCore::ResourceHandle*, const WebCore::AuthenticationChallenge&) final;
    126     bool loadingSynchronousXHR() final { return m_client.get().isSynchronous(); }
    127 #else
    12887    // NetworkDataTaskClient
    12988    void willPerformHTTPRedirection(WebCore::ResourceResponse&&, WebCore::ResourceRequest&&, RedirectCompletionHandler&&) final;
     
    14099
    141100    void completeAuthenticationChallenge(ChallengeCompletionHandler&&);
    142 #endif
    143101
    144102    std::reference_wrapper<NetworkLoadClient> m_client;
    145103    const NetworkLoadParameters m_parameters;
    146104    CompletionHandler<void(WebCore::ResourceRequest&&)> m_redirectCompletionHandler;
    147 #if USE(NETWORK_SESSION)
    148105    RefPtr<NetworkDataTask> m_task;
    149106    std::optional<WebCore::AuthenticationChallenge> m_challenge;
     
    155112    struct Throttle;
    156113    std::unique_ptr<Throttle> m_throttle;
    157 #else
    158     bool m_waitingForContinueCanAuthenticateAgainstProtectionSpace { false };
    159     RefPtr<RemoteNetworkingContext> m_networkingContext;
    160     RefPtr<WebCore::ResourceHandle> m_handle;
    161 #endif
    162114
    163115    WebCore::ResourceRequest m_currentRequest; // Updated on redirects.
  • trunk/Source/WebKit/NetworkProcess/NetworkLoadParameters.h

    r224299 r227364  
    2424 */
    2525
    26 #ifndef NetworkLoadParameters_h
    27 #define NetworkLoadParameters_h
     26#pragma once
    2827
    2928#include <WebCore/BlobDataFileReference.h>
     
    5049    bool defersLoading { false };
    5150    bool needsCertificateInfo { false };
    52 #if USE(NETWORK_SESSION)
    5351    Vector<RefPtr<WebCore::BlobDataFileReference>> blobFileReferences;
    54 #endif
    5552    PreconnectOnly shouldPreconnectOnly { PreconnectOnly::No };
    5653};
    5754
    5855} // namespace WebKit
    59 
    60 #endif // NetworkLoadParameters_h
  • trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp

    r226482 r227364  
    253253#endif
    254254
    255 #if USE(NETWORK_SESSION)
    256255#if ENABLE(LEGACY_CUSTOM_PROTOCOL_MANAGER)
    257256    parameters.defaultSessionParameters.legacyCustomProtocolManager = supplement<LegacyCustomProtocolManager>();
    258257#endif
    259258    SessionTracker::setSession(PAL::SessionID::defaultSessionID(), NetworkSession::create(WTFMove(parameters.defaultSessionParameters)));
    260 #endif
    261259
    262260    for (auto& supplement : m_supplements.values())
     
    301299{
    302300    NetworkStorageSession::defaultStorageSession().credentialStorage().clearCredentials();
    303 #if USE(NETWORK_SESSION)
    304301    if (auto* networkSession = SessionTracker::networkSession(PAL::SessionID::defaultSessionID()))
    305302        networkSession->clearCredentials();
    306303    else
    307304        ASSERT_NOT_REACHED();
    308 #endif
    309305}
    310306
     
    594590#endif
    595591
    596 #if USE(NETWORK_SESSION)
    597592void NetworkProcess::continueWillSendRequest(DownloadID downloadID, WebCore::ResourceRequest&& request)
    598593{
     
    619614    downloadProxyConnection()->send(Messages::DownloadProxy::DecideDestinationWithSuggestedFilenameAsync(networkDataTask.pendingDownloadID(), suggestedFilename), destinationID);
    620615}
    621 #endif
    622616
    623617void NetworkProcess::continueDecidePendingDownloadDestination(DownloadID downloadID, String destination, SandboxExtension::Handle&& sandboxExtensionHandle, bool allowOverwrite)
  • trunk/Source/WebKit/NetworkProcess/NetworkProcess.h

    r226482 r227364  
    120120#endif
    121121
    122 #if USE(NETWORK_SESSION)
    123122    void findPendingDownloadLocation(NetworkDataTask&, ResponseCompletionHandler&&, const WebCore::ResourceResponse&);
    124 #endif
    125123
    126124#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
     
    185183    IPC::Connection* downloadProxyConnection() override;
    186184    AuthenticationManager& downloadsAuthenticationManager() override;
    187 #if USE(NETWORK_SESSION)
    188185    void pendingDownloadCanceled(DownloadID) override;
    189 #endif
    190186
    191187    // Message Handlers
     
    211207    void continueCanAuthenticateAgainstProtectionSpace(uint64_t resourceLoadIdentifier, bool canAuthenticate);
    212208#endif
    213 #if USE(NETWORK_SESSION)
    214209    void continueWillSendRequest(DownloadID, WebCore::ResourceRequest&&);
    215 #endif
    216210    void continueDecidePendingDownloadDestination(DownloadID, String destination, SandboxExtension::Handle&&, bool allowOverwrite);
    217211
  • trunk/Source/WebKit/NetworkProcess/NetworkProcess.messages.in

    r226482 r227364  
    5050    ContinueCanAuthenticateAgainstProtectionSpace(uint64_t loaderID, bool canAuthenticate)
    5151#endif
    52 #if USE(NETWORK_SESSION)
    5352    ContinueWillSendRequest(WebKit::DownloadID downloadID, WebCore::ResourceRequest request)
    54 #endif
    5553    ContinueDecidePendingDownloadDestination(WebKit::DownloadID downloadID, String destination, WebKit::SandboxExtension::Handle sandboxExtensionHandle, bool allowOverwrite)
    5654
  • trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp

    r226913 r227364  
    107107    }
    108108
    109 #if !USE(NETWORK_SESSION)
    110     if (originalRequest().url().protocolIsBlob()) {
    111         ASSERT(!m_parameters.resourceSandboxExtension);
    112         m_fileReferences.appendVector(NetworkBlobRegistry::singleton().filesInBlob(connection, originalRequest().url()));
    113     }
    114 #endif
    115 
    116 
    117109    if (synchronousReply)
    118110        m_synchronousLoadData = std::make_unique<SynchronousLoadData>(WTFMove(synchronousReply));
     
    230222    parameters.request = request;
    231223
    232 #if USE(NETWORK_SESSION)
    233224    if (request.url().protocolIsBlob())
    234225        parameters.blobFileReferences = NetworkBlobRegistry::singleton().filesInBlob(m_connection, originalRequest().url());
     
    243234    }
    244235    m_networkLoad = std::make_unique<NetworkLoad>(*this, WTFMove(parameters), *networkSession);
    245 #else
    246     m_networkLoad = std::make_unique<NetworkLoad>(*this, WTFMove(parameters));
    247 #endif
    248236
    249237    if (m_defersLoading) {
  • trunk/Source/WebKit/NetworkProcess/NetworkSession.cpp

    r223791 r227364  
    2626#include "config.h"
    2727#include "NetworkSession.h"
    28 
    29 #if USE(NETWORK_SESSION)
    3028
    3129#include "NetworkDataTask.h"
     
    8886
    8987} // namespace WebKit
    90 
    91 #endif // USE(NETWORK_SESSION)
  • trunk/Source/WebKit/NetworkProcess/NetworkSession.h

    r223791 r227364  
    2525
    2626#pragma once
    27 
    28 #if USE(NETWORK_SESSION)
    2927
    3028#include <pal/SessionID.h>
     
    6866
    6967} // namespace WebKit
    70 
    71 #endif // USE(NETWORK_SESSION)
  • trunk/Source/WebKit/NetworkProcess/PingLoad.cpp

    r222739 r227364  
    2727#include "PingLoad.h"
    2828
    29 #if USE(NETWORK_SESSION)
    30 
    3129#include "AuthenticationManager.h"
    3230#include "Logging.h"
     
    331329
    332330} // namespace WebKit
    333 
    334 #endif // USE(NETWORK_SESSION)
  • trunk/Source/WebKit/NetworkProcess/PingLoad.h

    r222739 r227364  
    2525
    2626#pragma once
    27 
    28 #if USE(NETWORK_SESSION)
    2927
    3028#include "NetworkDataTask.h"
     
    9997
    10098}
    101 
    102 #endif // USE(NETWORK_SESSION)
  • trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp

    r224299 r227364  
    5959    parameters.contentEncodingSniffingPolicy = ContentEncodingSniffingPolicy::Sniff;
    6060    parameters.request = m_originalRequest;
    61 #if USE(NETWORK_SESSION)
    6261    m_networkLoad = std::make_unique<NetworkLoad>(*this, WTFMove(parameters), *SessionTracker::networkSession(PAL::SessionID::defaultSessionID()));
    63 #else
    64     m_networkLoad = std::make_unique<NetworkLoad>(*this, WTFMove(parameters));
    65 #endif
    6662}
    6763
  • trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.h

    r227103 r227364  
    2525
    2626#pragma once
    27 
    28 #if USE(NETWORK_SESSION)
    2927
    3028#include "NetworkDataTask.h"
     
    10098
    10199} // namespace WebKit
    102 
    103 #endif // USE(NETWORK_SESSION)
  • trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm

    r227103 r227364  
    2727#import "NetworkDataTaskCocoa.h"
    2828
    29 #if USE(NETWORK_SESSION)
    30 
    3129#import "AuthenticationManager.h"
    3230#import "Download.h"
     
    440438
    441439}
    442 
    443 #endif
  • trunk/Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm

    r226349 r227364  
    8080    SessionTracker::setIdentifierBase(parameters.uiProcessBundleIdentifier);
    8181
    82 #if USE(NETWORK_SESSION)
    8382    NetworkSessionCocoa::setSourceApplicationAuditTokenData(sourceApplicationAuditData());
    8483    NetworkSessionCocoa::setSourceApplicationBundleIdentifier(parameters.sourceApplicationBundleIdentifier);
     
    8786#if PLATFORM(IOS)
    8887    NetworkSessionCocoa::setCTDataConnectionServiceType(parameters.ctDataConnectionServiceType);
    89 #endif
    9088#endif
    9189
  • trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.h

    r223791 r227364  
    2525
    2626#pragma once
    27 
    28 #if USE(NETWORK_SESSION)
    2927
    3028OBJC_CLASS NSData;
     
    8886
    8987} // namespace WebKit
    90 
    91 #endif // USE(NETWORK_SESSION)
  • trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm

    r227103 r227364  
    2727#import "NetworkSessionCocoa.h"
    2828
    29 #if USE(NETWORK_SESSION)
    30 
    3129#import "AuthenticationManager.h"
    3230#import "DataReference.h"
     
    801799
    802800}
    803 
    804 #endif
  • trunk/Source/WebKit/NetworkProcess/mac/RemoteNetworkingContext.mm

    r225383 r227364  
    113113    }
    114114
    115 #if USE(NETWORK_SESSION)
    116115    parameters.networkSessionParameters.legacyCustomProtocolManager = NetworkProcess::singleton().supplement<LegacyCustomProtocolManager>();
    117116    SessionTracker::setSession(sessionID, NetworkSession::create(WTFMove(parameters.networkSessionParameters)));
    118 #endif
    119117}
    120118
  • trunk/Source/WebKit/PlatformMac.cmake

    r227001 r227364  
    2828    NetworkProcess/Downloads/cocoa/DownloadCocoa.mm
    2929
    30     NetworkProcess/Downloads/mac/DownloadMac.mm
    31 
    3230    NetworkProcess/cache/NetworkCacheCodersCocoa.cpp
    3331    NetworkProcess/cache/NetworkCacheDataCocoa.mm
     
    3836    NetworkProcess/cocoa/NetworkSessionCocoa.mm
    3937
    40     NetworkProcess/mac/NetworkLoadMac.mm
    4138    NetworkProcess/mac/NetworkProcessMac.mm
    4239    NetworkProcess/mac/RemoteNetworkingContext.mm
     
    7269    Shared/APIWebArchive.mm
    7370    Shared/APIWebArchiveResource.mm
    74 
    75     Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm
    7671
    7772    Shared/API/Cocoa/RemoteObjectInvocation.mm
     
    142137    Shared/mac/CodeSigning.mm
    143138    Shared/mac/ColorSpaceData.mm
    144     Shared/mac/CookieStorageShim.mm
    145139    Shared/mac/CookieStorageShimLibrary.cpp
    146140    Shared/mac/HangDetectionDisablerMac.mm
  • trunk/Source/WebKit/Shared/Authentication/AuthenticationManager.cpp

    r224828 r227364  
    117117
    118118    auto pageID = frame->page()->pageID();
    119     uint64_t challengeID = addChallengeToChallengeMap({pageID, authenticationChallenge
    120 #if USE(NETWORK_SESSION)
    121         , { }
    122 #endif
    123     });
     119    uint64_t challengeID = addChallengeToChallengeMap({ pageID, authenticationChallenge, { } });
    124120
    125121    // Coalesce challenges in the same protection space and in the same page.
     
    130126}
    131127
    132 #if USE(NETWORK_SESSION)
    133128void AuthenticationManager::didReceiveAuthenticationChallenge(uint64_t pageID, uint64_t frameID, const AuthenticationChallenge& authenticationChallenge, ChallengeCompletionHandler&& completionHandler)
    134129{
     
    156151    download.send(Messages::DownloadProxy::DidReceiveAuthenticationChallenge(authenticationChallenge, challengeID));
    157152}
    158 #endif
    159 
    160 #if !USE(NETWORK_SESSION)
    161 void AuthenticationManager::didReceiveAuthenticationChallenge(uint64_t pageID, uint64_t frameID, const AuthenticationChallenge& authenticationChallenge)
    162 {
    163     ASSERT(pageID);
    164     ASSERT(frameID);
    165 
    166     uint64_t challengeID = addChallengeToChallengeMap({pageID, authenticationChallenge});
    167 
    168     // Coalesce challenges in the same protection space and in the same page.
    169     if (shouldCoalesceChallenge(pageID, challengeID, authenticationChallenge))
    170         return;
    171    
    172     m_process.send(Messages::NetworkProcessProxy::DidReceiveAuthenticationChallenge(pageID, frameID, authenticationChallenge, challengeID));
    173 }
    174 #endif
    175 
    176 #if !USE(NETWORK_SESSION)
    177 void AuthenticationManager::didReceiveAuthenticationChallenge(Download& download, const AuthenticationChallenge& authenticationChallenge)
    178 {
    179     uint64_t dummyPageID = 0;
    180     uint64_t challengeID = addChallengeToChallengeMap({dummyPageID, authenticationChallenge});
    181 
    182     // Coalesce challenges in the same protection space and in the same page.
    183     if (shouldCoalesceChallenge(dummyPageID, challengeID, authenticationChallenge))
    184         return;
    185 
    186     download.send(Messages::DownloadProxy::DidReceiveAuthenticationChallenge(authenticationChallenge, challengeID));
    187 }
    188 #endif
    189153
    190154// Currently, only Mac knows how to respond to authentication challenges with certificate info.
     
    209173    ASSERT(!challenge.challenge.isNull());
    210174
    211 #if USE(NETWORK_SESSION)
    212175    auto completionHandler = WTFMove(challenge.completionHandler);
    213 #else
    214     ChallengeCompletionHandler completionHandler = nullptr;
    215 #endif
    216176   
    217177    if (tryUseCertificateInfoForChallenge(challenge.challenge, certificateInfo, completionHandler))
     
    219179
    220180    AuthenticationClient* coreClient = challenge.challenge.authenticationClient();
    221 #if USE(NETWORK_SESSION)
    222181    // If there is a completion handler, then there is no AuthenticationClient.
    223182    // FIXME: Remove the use of AuthenticationClient in WebKit2 once NETWORK_SESSION is used for all loads.
     
    228187    }
    229188    ASSERT(coreClient);
    230 #endif
    231189
    232190    if (coreClient)
    233191        coreClient->receivedCredential(challenge.challenge, credential);
    234 #if !USE(NETWORK_SESSION)
    235     else
    236         receivedCredential(challenge.challenge, credential);
    237 #endif
    238192}
    239193
     
    252206
    253207    AuthenticationClient* coreClient = challenge.challenge.authenticationClient();
    254 #if USE(NETWORK_SESSION)
    255208    if (challenge.completionHandler) {
    256209        ASSERT(!coreClient);
     
    259212    }
    260213    ASSERT(coreClient);
    261 #endif
    262214
    263215    if (coreClient)
    264216        coreClient->receivedRequestToContinueWithoutCredential(challenge.challenge);
    265 #if !USE(NETWORK_SESSION)
    266     else
    267         receivedRequestToContinueWithoutCredential(challenge.challenge);
    268 #endif
    269217}
    270218
     
    283231
    284232    AuthenticationClient* coreClient = challenge.challenge.authenticationClient();
    285 #if USE(NETWORK_SESSION)
    286233    if (challenge.completionHandler) {
    287234        ASSERT(!coreClient);
     
    290237    }
    291238    ASSERT(coreClient);
    292 #endif
    293239
    294240    if (coreClient)
    295241        coreClient->receivedCancellation(challenge.challenge);
    296 #if !USE(NETWORK_SESSION)
    297     else
    298         receivedCancellation(challenge.challenge);
    299 #endif
    300242}
    301243
     
    314256
    315257    AuthenticationClient* coreClient = challenge.challenge.authenticationClient();
    316 #if USE(NETWORK_SESSION)
    317258    if (challenge.completionHandler) {
    318259        ASSERT(!coreClient);
     
    321262    }
    322263    ASSERT(coreClient);
    323 #endif
    324264
    325265    if (coreClient)
    326266        coreClient->receivedRequestToPerformDefaultHandling(challenge.challenge);
    327 #if !USE(NETWORK_SESSION)
    328     else
    329         receivedRequestToPerformDefaultHandling(challenge.challenge);
    330 #endif
    331267}
    332268
     
    345281
    346282    AuthenticationClient* coreClient = challenge.challenge.authenticationClient();
    347 #if USE(NETWORK_SESSION)
    348283    if (challenge.completionHandler) {
    349284        ASSERT(!coreClient);
     
    352287    }
    353288    ASSERT(coreClient);
    354 #endif
    355289
    356290    if (coreClient)
    357291        coreClient->receivedChallengeRejection(challenge.challenge);
    358 #if !USE(NETWORK_SESSION)
    359     else
    360         receivedChallengeRejection(challenge.challenge);
    361 #endif
    362292}
    363293
  • trunk/Source/WebKit/Shared/Authentication/AuthenticationManager.h

    r223431 r227364  
    6767    static const char* supplementName();
    6868
    69 #if USE(NETWORK_SESSION)
    7069    void didReceiveAuthenticationChallenge(uint64_t pageID, uint64_t frameID, const WebCore::AuthenticationChallenge&, ChallengeCompletionHandler&&);
    7170    void didReceiveAuthenticationChallenge(IPC::MessageSender& download, const WebCore::AuthenticationChallenge&, ChallengeCompletionHandler&&);
     
    7372    void continueCanAuthenticateAgainstProtectionSpace(DownloadID, bool canAuthenticate);
    7473#endif
    75 #endif
    7674    // Called for resources in the WebProcess (NetworkProcess disabled)
    7775    void didReceiveAuthenticationChallenge(WebFrame*, const WebCore::AuthenticationChallenge&);
    78 
    79 #if !USE(NETWORK_SESSION)
    80     // Called for resources in the NetworkProcess (NetworkProcess enabled)
    81     void didReceiveAuthenticationChallenge(uint64_t pageID, uint64_t frameID, const WebCore::AuthenticationChallenge&);
    82     void didReceiveAuthenticationChallenge(Download&, const WebCore::AuthenticationChallenge&);
    83 #endif
    8476
    8577    void useCredentialForChallenge(uint64_t challengeID, const WebCore::Credential&, const WebCore::CertificateInfo&);
     
    10193        uint64_t pageID;
    10294        WebCore::AuthenticationChallenge challenge;
    103 #if USE(NETWORK_SESSION)
    10495        ChallengeCompletionHandler completionHandler;
    105 #endif
    10696    };
    10797   
  • trunk/Source/WebKit/Shared/SessionTracker.cpp

    r223791 r227364  
    5656}
    5757
    58 #if USE(NETWORK_SESSION)
    5958static HashMap<PAL::SessionID, RefPtr<NetworkSession>>& staticSessionMap()
    6059{
     
    7473    staticSessionMap().set(sessionID, WTFMove(session));
    7574}
    76 #endif
    7775
    7876void SessionTracker::destroySession(PAL::SessionID sessionID)
    7977{
    8078    ASSERT(RunLoop::isMain());
    81 #if USE(NETWORK_SESSION)
    8279    auto session = staticSessionMap().take(sessionID);
    8380    if (session)
    8481        session->invalidateAndCancel();
    85 #endif
    8682    NetworkStorageSession::destroySession(sessionID);
    8783}
  • trunk/Source/WebKit/Shared/SessionTracker.h

    r220887 r227364  
    4646    static void setIdentifierBase(const String&);
    4747   
    48 #if USE(NETWORK_SESSION)
    4948    static void setSession(PAL::SessionID, Ref<NetworkSession>&&);
    5049    static NetworkSession* networkSession(PAL::SessionID);
    51 #endif
    5250    static void destroySession(PAL::SessionID);
    5351};
  • trunk/Source/WebKit/UIProcess/API/APIDownloadClient.h

    r224373 r227364  
    5454    virtual void didReceiveResponse(WebKit::WebProcessPool&, WebKit::DownloadProxy&, const WebCore::ResourceResponse&) { }
    5555    virtual void didReceiveData(WebKit::WebProcessPool&, WebKit::DownloadProxy&, uint64_t) { }
    56 #if !USE(NETWORK_SESSION)
    57     virtual bool shouldDecodeSourceDataOfMIMEType(WebKit::WebProcessPool&, WebKit::DownloadProxy&, const WTF::String&) { return true; }
    58 #endif
    5956    virtual void decideDestinationWithSuggestedFilename(WebKit::WebProcessPool&, WebKit::DownloadProxy&, const WTF::String&, Function<void(WebKit::AllowOverwrite, WTF::String)>&& completionHandler) { completionHandler(WebKit::AllowOverwrite::No, { }); }
    6057    virtual void didCreateDestination(WebKit::WebProcessPool&, WebKit::DownloadProxy&, const WTF::String&) { }
  • trunk/Source/WebKit/UIProcess/API/C/WKContext.cpp

    r225622 r227364  
    205205        }
    206206
    207 #if !USE(NETWORK_SESSION)
    208         bool shouldDecodeSourceDataOfMIMEType(WebProcessPool& processPool, DownloadProxy& downloadProxy, const String& mimeType) final
    209         {
    210             if (!m_client.shouldDecodeSourceDataOfMIMEType)
    211                 return true;
    212 
    213             return m_client.shouldDecodeSourceDataOfMIMEType(toAPI(&processPool), toAPI(&downloadProxy), toAPI(mimeType.impl()), m_client.base.clientInfo);
    214         }
    215 #endif
    216 
    217207        void decideDestinationWithSuggestedFilename(WebProcessPool& processPool, DownloadProxy& downloadProxy, const String& filename, Function<void(AllowOverwrite, WTF::String)>&& completionHandler) final
    218208        {
  • trunk/Source/WebKit/UIProcess/Cocoa/DownloadClient.h

    r224373 r227364  
    5757    void willSendRequest(WebProcessPool&, DownloadProxy&, WebCore::ResourceRequest&&, const WebCore::ResourceResponse&, CompletionHandler<void(WebCore::ResourceRequest&&)>&&) final;
    5858    void didReceiveAuthenticationChallenge(WebProcessPool&, DownloadProxy&, AuthenticationChallengeProxy&) final;
    59 #if !USE(NETWORK_SESSION)
    60     bool shouldDecodeSourceDataOfMIMEType(WebProcessPool&, DownloadProxy&, const String&) final;
    61 #endif
    6259    void didCreateDestination(WebProcessPool&, DownloadProxy&, const String&) final;
    6360    void processDidCrash(WebProcessPool&, DownloadProxy&) final;
  • trunk/Source/WebKit/UIProcess/Cocoa/DownloadClient.mm

    r224373 r227364  
    125125}
    126126
    127 #if !USE(NETWORK_SESSION)
    128 bool DownloadClient::shouldDecodeSourceDataOfMIMEType(WebProcessPool&, DownloadProxy& downloadProxy, const String& mimeType)
    129 {
    130     if (m_delegateMethods.downloadShouldDecodeSourceDataOfMIMEType)
    131         return [m_delegate _download:wrapper(downloadProxy) shouldDecodeSourceDataOfMIMEType:mimeType];
    132     return true;
    133 }
    134 #endif
    135 
    136127void DownloadClient::didCreateDestination(WebProcessPool&, DownloadProxy& downloadProxy, const String& destination)
    137128{
  • trunk/Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp

    r223798 r227364  
    135135        m_redirectChain.append(newRequest.url());
    136136
    137 #if USE(NETWORK_SESSION)
    138137        if (!protectedThis->m_processPool)
    139138            return;
     
    144143
    145144        networkProcessProxy->send(Messages::NetworkProcess::ContinueWillSendRequest(protectedThis->m_downloadID, newRequest), 0);
    146 #endif
    147145    });
    148146}
     
    153151        return;
    154152
    155 #if !USE(NETWORK_SESSION)
    156     // As per https://html.spec.whatwg.org/#as-a-download (step 2), the filename from the Content-Disposition header
    157     // should override the suggested filename from the download attribute.
    158     if (!m_suggestedFilename.isNull() && response.isAttachmentWithFilename())
    159         m_suggestedFilename = String();
    160 #endif
    161 
    162153    m_processPool->downloadClient().didReceiveResponse(*m_processPool, *this, response);
    163154}
     
    170161    m_processPool->downloadClient().didReceiveData(*m_processPool, *this, length);
    171162}
    172 
    173 #if !USE(NETWORK_SESSION)
    174 void DownloadProxy::shouldDecodeSourceDataOfMIMEType(const String& mimeType, bool& result)
    175 {
    176     result = false;
    177 
    178     if (!m_processPool)
    179         return;
    180 
    181     result = m_processPool->downloadClient().shouldDecodeSourceDataOfMIMEType(*m_processPool, *this, mimeType);
    182 }
    183 #endif
    184163
    185164void DownloadProxy::decideDestinationWithSuggestedFilenameAsync(DownloadID downloadID, const String& suggestedFilename)
     
    198177}
    199178
    200 #if !USE(NETWORK_SESSION)
    201 
    202 void DownloadProxy::decideDestinationWithSuggestedFilename(const String& filename, const String& mimeType, Ref<Messages::DownloadProxy::DecideDestinationWithSuggestedFilename::DelayedReply>&& reply)
    203 {
    204     if (!m_processPool)
    205         return;
    206 
    207     String suggestedFilename = MIMETypeRegistry::appendFileExtensionIfNecessary(m_suggestedFilename.isEmpty() ? filename : m_suggestedFilename, mimeType);
    208     m_processPool->downloadClient().decideDestinationWithSuggestedFilename(*m_processPool, *this, suggestedFilename, [reply = WTFMove(reply)] (AllowOverwrite allowOverwrite, String destination) {
    209         SandboxExtension::Handle sandboxExtensionHandle;
    210         if (!destination.isNull())
    211             SandboxExtension::createHandle(destination, SandboxExtension::Type::ReadWrite, sandboxExtensionHandle);
    212         reply->send(destination, allowOverwrite == AllowOverwrite::Yes, sandboxExtensionHandle);
    213     });
    214 }
    215 
    216 #endif
    217 
    218179void DownloadProxy::didCreateDestination(const String& path)
    219180{
  • trunk/Source/WebKit/UIProcess/Downloads/DownloadProxy.h

    r223730 r227364  
    8686    // IPC::MessageReceiver
    8787    void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override;
    88     void didReceiveSyncMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&) override;
    8988
    9089    // Message handlers.
     
    9998    void didCancel(const IPC::DataReference& resumeData);
    10099    void willSendRequest(WebCore::ResourceRequest&& redirectRequest, const WebCore::ResourceResponse& redirectResponse);
    101 #if !USE(NETWORK_SESSION)
    102     void decideDestinationWithSuggestedFilename(const String& filename, const String& mimeType, Ref<Messages::DownloadProxy::DecideDestinationWithSuggestedFilename::DelayedReply>&&);
    103 #endif
    104100    void decideDestinationWithSuggestedFilenameAsync(DownloadID, const String& suggestedFilename);
    105101
  • trunk/Source/WebKit/UIProcess/Downloads/DownloadProxy.messages.in

    r223730 r227364  
    2929    DidReceiveResponse(WebCore::ResourceResponse response)
    3030    DidReceiveData(uint64_t length)
    31 #if !USE(NETWORK_SESSION)
    32     ShouldDecodeSourceDataOfMIMEType(String mimeType) -> (bool result)
    33     DecideDestinationWithSuggestedFilename(String filename, String mimeType) -> (String destination, bool allowOverwrite, WebKit::SandboxExtension::Handle sandboxExtensionHandle) Delayed
    34 #endif
    3531    DidCreateDestination(String path)
    3632    DidFinish()
  • trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj

    r227340 r227364  
    11871187                53BA47D11DC2EF5E004DF4AD /* NetworkDataTaskBlob.h in Headers */ = {isa = PBXBuildFile; fileRef = 539EB5471DC2EE40009D48CF /* NetworkDataTaskBlob.h */; };
    11881188                53DEA3661DDE423100E82648 /* json.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 53DEA3651DDE422E00E82648 /* json.hpp */; };
    1189                 5C052F261C6D3BD30076E919 /* AuthenticationManagerCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C052F241C6D3AB60076E919 /* AuthenticationManagerCocoa.mm */; };
    11901189                5C0B17781E7C880E00E9123C /* NetworkSocketStreamMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C0B17741E7C879C00E9123C /* NetworkSocketStreamMessageReceiver.cpp */; };
    11911190                5C0B17791E7C882100E9123C /* WebSocketStreamMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C0B17761E7C879C00E9123C /* WebSocketStreamMessageReceiver.cpp */; };
     
    12021201                5C1427061C23F84C00D41183 /* DownloadManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C1426F81C23F84300D41183 /* DownloadManager.cpp */; };
    12031202                5C1427071C23F84C00D41183 /* DownloadManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C1426F91C23F84300D41183 /* DownloadManager.h */; };
    1204                 5C1427111C23F89E00D41183 /* DownloadIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C14270D1C23F88500D41183 /* DownloadIOS.mm */; };
    1205                 5C1427121C23F89E00D41183 /* DownloadMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C14270F1C23F89900D41183 /* DownloadMac.mm */; };
    12061203                5C1427131C23F89E00D41183 /* DownloadCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C1427091C23F86900D41183 /* DownloadCocoa.mm */; };
    12071204                5C1427181C23F8B700D41183 /* LegacyCustomProtocolManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C1427141C23F8B000D41183 /* LegacyCustomProtocolManager.h */; };
     
    14111408                8360349F1ACB34D600626549 /* WebSQLiteDatabaseTracker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8360349D1ACB34D600626549 /* WebSQLiteDatabaseTracker.cpp */; };
    14121409                836034A01ACB34D600626549 /* WebSQLiteDatabaseTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 8360349E1ACB34D600626549 /* WebSQLiteDatabaseTracker.h */; };
    1413                 836EEB801BE9EC9E006B4B82 /* NetworkLoadMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 836EEB7F1BE9EC9E006B4B82 /* NetworkLoadMac.mm */; };
    14141410                8372DB251A674C8F00C697C5 /* WKPageDiagnosticLoggingClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 8372DB241A674C8F00C697C5 /* WKPageDiagnosticLoggingClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
    14151411                8372DB281A67562800C697C5 /* WebPageDiagnosticLoggingClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8372DB261A67562800C697C5 /* WebPageDiagnosticLoggingClient.cpp */; };
     
    14281424                83A0ED351F747CCF003299EB /* PreconnectTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 83A0ED321F747CC6003299EB /* PreconnectTask.h */; };
    14291425                83BDCCB91AC5FDB6003F6441 /* NetworkCacheStatistics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83BDCCB81AC5FDB6003F6441 /* NetworkCacheStatistics.cpp */; };
    1430                 83BFAC421D96137C00433490 /* BlobDownloadClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 83BFAC401D96136000433490 /* BlobDownloadClient.h */; };
    1431                 83BFAC431D96137C00433490 /* BlobDownloadClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83BFAC411D96136000433490 /* BlobDownloadClient.cpp */; };
    14321426                83D454D71BE9D3C4006C93BD /* NetworkLoadClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 83D454D61BE9D3C4006C93BD /* NetworkLoadClient.h */; };
    14331427                83EE575B1DB7D61100C74C50 /* WebValidationMessageClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83EE57591DB7D60600C74C50 /* WebValidationMessageClient.cpp */; };
     
    20282022                CDC38307172117DD008A2FC3 /* CookieStorageShimLibrary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDC382F9172116D3008A2FC3 /* CookieStorageShimLibrary.cpp */; };
    20292023                CDC3830C17212282008A2FC3 /* CookieStorageShimLibrary.h in Headers */ = {isa = PBXBuildFile; fileRef = CDC3830B172121CE008A2FC3 /* CookieStorageShimLibrary.h */; };
    2030                 CDC3831017212440008A2FC3 /* CookieStorageShim.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDC3830D1721242D008A2FC3 /* CookieStorageShim.mm */; };
    20312024                CDCA85C8132ABA4E00E961DF /* WKFullScreenWindowController.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDCA85C6132ABA4E00E961DF /* WKFullScreenWindowController.mm */; };
    20322025                CDCA85C9132ABA4E00E961DF /* WKFullScreenWindowController.h in Headers */ = {isa = PBXBuildFile; fileRef = CDCA85C7132ABA4E00E961DF /* WKFullScreenWindowController.h */; };
     
    35813574                539EB5471DC2EE40009D48CF /* NetworkDataTaskBlob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NetworkDataTaskBlob.h; path = NetworkProcess/NetworkDataTaskBlob.h; sourceTree = "<group>"; };
    35823575                53DEA3651DDE422E00E82648 /* json.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = json.hpp; path = NetworkProcess/capture/json.hpp; sourceTree = "<group>"; };
    3583                 5C052F241C6D3AB60076E919 /* AuthenticationManagerCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AuthenticationManagerCocoa.mm; path = Authentication/cocoa/AuthenticationManagerCocoa.mm; sourceTree = "<group>"; };
    35843576                5C0B17741E7C879C00E9123C /* NetworkSocketStreamMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkSocketStreamMessageReceiver.cpp; sourceTree = "<group>"; };
    35853577                5C0B17751E7C879C00E9123C /* NetworkSocketStreamMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetworkSocketStreamMessages.h; sourceTree = "<group>"; };
     
    36043596                5C1426F91C23F84300D41183 /* DownloadManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DownloadManager.h; path = NetworkProcess/Downloads/DownloadManager.h; sourceTree = "<group>"; };
    36053597                5C1427091C23F86900D41183 /* DownloadCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = DownloadCocoa.mm; path = NetworkProcess/Downloads/cocoa/DownloadCocoa.mm; sourceTree = "<group>"; };
    3606                 5C14270D1C23F88500D41183 /* DownloadIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = DownloadIOS.mm; path = NetworkProcess/Downloads/ios/DownloadIOS.mm; sourceTree = "<group>"; };
    3607                 5C14270F1C23F89900D41183 /* DownloadMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = DownloadMac.mm; path = NetworkProcess/Downloads/mac/DownloadMac.mm; sourceTree = "<group>"; };
    36083598                5C1427141C23F8B000D41183 /* LegacyCustomProtocolManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LegacyCustomProtocolManager.h; path = NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h; sourceTree = "<group>"; };
    36093599                5C1427151C23F8B000D41183 /* LegacyCustomProtocolManager.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = LegacyCustomProtocolManager.messages.in; path = NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.messages.in; sourceTree = "<group>"; };
     
    38383828                8360349D1ACB34D600626549 /* WebSQLiteDatabaseTracker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebSQLiteDatabaseTracker.cpp; sourceTree = "<group>"; };
    38393829                8360349E1ACB34D600626549 /* WebSQLiteDatabaseTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebSQLiteDatabaseTracker.h; sourceTree = "<group>"; };
    3840                 836EEB7F1BE9EC9E006B4B82 /* NetworkLoadMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = NetworkLoadMac.mm; sourceTree = "<group>"; };
    38413830                8372DB241A674C8F00C697C5 /* WKPageDiagnosticLoggingClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKPageDiagnosticLoggingClient.h; sourceTree = "<group>"; };
    38423831                8372DB261A67562800C697C5 /* WebPageDiagnosticLoggingClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebPageDiagnosticLoggingClient.cpp; sourceTree = "<group>"; };
     
    38553844                83A0ED331F747CC7003299EB /* PreconnectTask.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PreconnectTask.cpp; path = NetworkProcess/PreconnectTask.cpp; sourceTree = "<group>"; };
    38563845                83BDCCB81AC5FDB6003F6441 /* NetworkCacheStatistics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkCacheStatistics.cpp; sourceTree = "<group>"; };
    3857                 83BFAC401D96136000433490 /* BlobDownloadClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BlobDownloadClient.h; path = NetworkProcess/Downloads/BlobDownloadClient.h; sourceTree = "<group>"; };
    3858                 83BFAC411D96136000433490 /* BlobDownloadClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BlobDownloadClient.cpp; path = NetworkProcess/Downloads/BlobDownloadClient.cpp; sourceTree = "<group>"; };
    38593846                83D454D61BE9D3C4006C93BD /* NetworkLoadClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NetworkLoadClient.h; path = NetworkProcess/NetworkLoadClient.h; sourceTree = "<group>"; };
    38603847                83EE57591DB7D60600C74C50 /* WebValidationMessageClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebValidationMessageClient.cpp; sourceTree = "<group>"; };
     
    45024489                CDC3830617211799008A2FC3 /* WebProcessShim.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = WebProcessShim.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
    45034490                CDC3830B172121CE008A2FC3 /* CookieStorageShimLibrary.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CookieStorageShimLibrary.h; sourceTree = "<group>"; };
    4504                 CDC3830D1721242D008A2FC3 /* CookieStorageShim.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CookieStorageShim.mm; sourceTree = "<group>"; };
    4505                 CDC3830E1721242D008A2FC3 /* CookieStorageShim.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CookieStorageShim.h; sourceTree = "<group>"; };
    45064491                CDC8F4881725E67800166F6E /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
    45074492                CDCA85C6132ABA4E00E961DF /* WKFullScreenWindowController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKFullScreenWindowController.mm; sourceTree = "<group>"; };
     
    63006285                        children = (
    63016286                                E17AE2C116B9C139001C42F1 /* com.apple.WebKit.NetworkProcess.sb.in */,
    6302                                 836EEB7F1BE9EC9E006B4B82 /* NetworkLoadMac.mm */,
    63036287                                51A8A6151627F3F9000D90E9 /* NetworkProcessMac.mm */,
    63046288                                E1B78472163F253E0007B692 /* RemoteNetworkingContext.mm */,
     
    64956479                        isa = PBXGroup;
    64966480                        children = (
    6497                                 5C052F231C6D3AA10076E919 /* cocoa */,
    64986481                                518E8EF616B2091C00E91429 /* mac */,
    64996482                                518E8EF316B2091C00E91429 /* AuthenticationManager.cpp */,
     
    66326615                        sourceTree = "<group>";
    66336616                };
    6634                 5C052F231C6D3AA10076E919 /* cocoa */ = {
    6635                         isa = PBXGroup;
    6636                         children = (
    6637                                 5C052F241C6D3AB60076E919 /* AuthenticationManagerCocoa.mm */,
    6638                         );
    6639                         name = cocoa;
    6640                         sourceTree = "<group>";
    6641                 };
    66426617                5C1426F11C23F81700D41183 /* Downloads */ = {
    66436618                        isa = PBXGroup;
    66446619                        children = (
    66456620                                5C1427081C23F85200D41183 /* cocoa */,
    6646                                 5C14270C1C23F87700D41183 /* ios */,
    6647                                 5C14270B1C23F87100D41183 /* mac */,
    6648                                 83BFAC411D96136000433490 /* BlobDownloadClient.cpp */,
    6649                                 83BFAC401D96136000433490 /* BlobDownloadClient.h */,
    66506621                                5C1426F31C23F84300D41183 /* Download.cpp */,
    66516622                                5C1426F41C23F84300D41183 /* Download.h */,
     
    66766647                        );
    66776648                        name = cocoa;
    6678                         sourceTree = "<group>";
    6679                 };
    6680                 5C14270B1C23F87100D41183 /* mac */ = {
    6681                         isa = PBXGroup;
    6682                         children = (
    6683                                 5C14270F1C23F89900D41183 /* DownloadMac.mm */,
    6684                         );
    6685                         name = mac;
    6686                         sourceTree = "<group>";
    6687                 };
    6688                 5C14270C1C23F87700D41183 /* ios */ = {
    6689                         isa = PBXGroup;
    6690                         children = (
    6691                                 5C14270D1C23F88500D41183 /* DownloadIOS.mm */,
    6692                         );
    6693                         name = ios;
    66946649                        sourceTree = "<group>";
    66956650                };
     
    75257480                                1A2A4AFE158693920090C9E9 /* ColorSpaceData.h */,
    75267481                                1A2A4AFD158693920090C9E9 /* ColorSpaceData.mm */,
    7527                                 CDC3830E1721242D008A2FC3 /* CookieStorageShim.h */,
    7528                                 CDC3830D1721242D008A2FC3 /* CookieStorageShim.mm */,
    75297482                                CDC382F9172116D3008A2FC3 /* CookieStorageShimLibrary.cpp */,
    75307483                                CDC3830B172121CE008A2FC3 /* CookieStorageShimLibrary.h */,
     
    86858638                                46A2B6091E5676A600C3DEDA /* BackgroundProcessResponsivenessTimer.h in Headers */,
    86868639                                E164A2F2191AF14E0010737D /* BlobDataFileReferenceWithSandboxExtension.h in Headers */,
    8687                                 83BFAC421D96137C00433490 /* BlobDownloadClient.h in Headers */,
    86888640                                E170876C16D6CA6900F99226 /* BlobRegistryProxy.h in Headers */,
    86898641                                4F601432155C5AA2001FBDE0 /* BlockingResponseMap.h in Headers */,
     
    1026210214                                518E8EF816B2091C00E91429 /* AuthenticationManager.cpp in Sources */,
    1026310215                                518E8EFB16B2091C00E91429 /* AuthenticationManager.mac.mm in Sources */,
    10264                                 5C052F261C6D3BD30076E919 /* AuthenticationManagerCocoa.mm in Sources */,
    1026510216                                512F58A212A883AD00629530 /* AuthenticationManagerMessageReceiver.cpp in Sources */,
    1026610217                                9955A6F41C7986DC00EB6A93 /* AutomationBackendDispatchers.cpp in Sources */,
     
    1027110222                                46A2B6081E5676A600C3DEDA /* BackgroundProcessResponsivenessTimer.cpp in Sources */,
    1027210223                                E164A2F1191AF14E0010737D /* BlobDataFileReferenceWithSandboxExtension.cpp in Sources */,
    10273                                 83BFAC431D96137C00433490 /* BlobDownloadClient.cpp in Sources */,
    1027410224                                E170876B16D6CA6900F99226 /* BlobRegistryProxy.cpp in Sources */,
    1027510225                                BCF18638167D071E00A1A85A /* CacheModel.cpp in Sources */,
     
    1029210242                                1A30EAC6115D7DA30053E937 /* ConnectionMac.mm in Sources */,
    1029310243                                5106D7C218BDBE73000AB166 /* ContextMenuContextData.cpp in Sources */,
    10294                                 CDC3831017212440008A2FC3 /* CookieStorageShim.mm in Sources */,
    1029510244                                5104F5A21F19D7D2004CF821 /* CookieStorageUtilsCF.mm in Sources */,
    1029610245                                B878B616133428DC006888E9 /* CorrectionPanel.mm in Sources */,
     
    1030210251                                A1DF631218E0B7C8003A3E2A /* DownloadClient.mm in Sources */,
    1030310252                                5C1427131C23F89E00D41183 /* DownloadCocoa.mm in Sources */,
    10304                                 5C1427111C23F89E00D41183 /* DownloadIOS.mm in Sources */,
    10305                                 5C1427121C23F89E00D41183 /* DownloadMac.mm in Sources */,
    1030610253                                5C1427061C23F84C00D41183 /* DownloadManager.cpp in Sources */,
    1030710254                                1AB7D4CB1288AAA700CFD08C /* DownloadProxy.cpp in Sources */,
     
    1043410381                                530258461DCBBD2200DA89C2 /* NetworkDataTaskReplay.cpp in Sources */,
    1043510382                                839902021BE9A02B000F3653 /* NetworkLoad.cpp in Sources */,
    10436                                 836EEB801BE9EC9E006B4B82 /* NetworkLoadMac.mm in Sources */,
    1043710383                                51795568162876CF00FA43B6 /* NetworkProcess.cpp in Sources */,
    1043810384                                7EC4F0FB18E4ACBB008056AF /* NetworkProcessCocoa.mm in Sources */,
  • trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm

    r226325 r227364  
    6868    NetworkStorageSession::ensureSession(sessionID, base + '.' + String::number(sessionID.sessionID()), WTFMove(uiProcessCookieStorage));
    6969
    70 #if USE(NETWORK_SESSION)
    7170    SessionTracker::setSession(sessionID, NetworkSession::create(WTFMove(parameters.networkSessionParameters)));
    72 #endif
    7371}
    7472
  • trunk/Source/WebKit/WebProcess/WebProcess.cpp

    r227340 r227364  
    130130
    131131#if PLATFORM(COCOA)
    132 #include "CookieStorageShim.h"
    133132#include "ObjCObjectGraph.h"
    134133#include "UserMediaCaptureManager.h"
     
    277276    platformInitializeWebProcess(WTFMove(parameters));
    278277
    279 #if USE(NETWORK_SESSION)
    280278    SessionTracker::setSession(PAL::SessionID::defaultSessionID(), NetworkSession::create({ }));
    281 #endif
    282279
    283280    // Match the QoS of the UIProcess and the scrolling thread but use a slightly lower priority.
     
    390387    ensureNetworkProcessConnection();
    391388
    392 #if PLATFORM(COCOA) && !USE(NETWORK_SESSION)
    393     CookieStorageShim::singleton().initialize();
    394 #endif
    395389    setTerminationTimeout(parameters.terminationTimeout);
    396390
     
    561555{
    562556    NetworkStorageSession::defaultStorageSession().credentialStorage().clearCredentials();
    563 #if USE(NETWORK_SESSION)
    564557    if (auto* networkSession = SessionTracker::networkSession(PAL::SessionID::defaultSessionID()))
    565558        networkSession->clearCredentials();
    566559    else
    567560        ASSERT_NOT_REACHED();
    568 #endif
    569561}
    570562
  • trunk/Source/WebKit/config.h

    r224828 r227364  
    8080
    8181#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200) || PLATFORM(IOS) || PLATFORM(APPLETV) || PLATFORM(WATCHOS) || USE(SOUP)
    82 #ifndef USE_NETWORK_SESSION
    83 #define USE_NETWORK_SESSION 1
    84 #endif
    85 
    8682#ifndef ENABLE_BEACON_API
    8783#define ENABLE_BEACON_API 1
     
    9490#endif
    9591
    96 #if USE(NETWORK_SESSION) && ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000))
     92#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)
    9793#ifndef ENABLE_SERVER_PRECONNECT
    9894#define ENABLE_SERVER_PRECONNECT 1
     
    113109
    114110#ifndef ENABLE_NETWORK_CAPTURE
    115 #if USE(NETWORK_SESSION) && PLATFORM(COCOA)
     111#if PLATFORM(COCOA)
    116112#define ENABLE_NETWORK_CAPTURE 1
    117113#endif
Note: See TracChangeset for help on using the changeset viewer.