Initial NSURLSession WebResourceLoader implementation
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Oct 2015 18:00:29 +0000 (18:00 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Oct 2015 18:00:29 +0000 (18:00 +0000)
commit4e175e580770436688e05ae9bdb2f0f99224cbe8
treeae9b5669043fed88750150ebc125841d4ea35dbe
parentd852267131e87bf28ef8bec95a8e35916f21a05d
Initial NSURLSession WebResourceLoader implementation
https://bugs.webkit.org/show_bug.cgi?id=150355

Reviewed by Antti Koivisto.

Source/WebCore:

* platform/network/cf/AuthenticationChallenge.h:
(WebCore::AuthenticationChallenge::AuthenticationChallenge): Export constructor for use in WebKit2.

Source/WebKit2:

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
(WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::~NetworkResourceLoader):
(WebKit::NetworkResourceLoader::startNetworkLoad):
(WebKit::NetworkResourceLoader::setDefersLoading):
(WebKit::NetworkResourceLoader::cleanup):
(WebKit::NetworkResourceLoader::didConvertHandleToDownload):
(WebKit::NetworkResourceLoader::abort):
(WebKit::NetworkResourceLoader::willPerformHTTPRedirection):
(WebKit::NetworkResourceLoader::didReceiveChallenge):
(WebKit::NetworkResourceLoader::didReceiveResponse):
(WebKit::NetworkResourceLoader::didReceiveData):
(WebKit::NetworkResourceLoader::didCompleteWithError):
(WebKit::NetworkResourceLoader::didReceiveResponseAsync):
(WebKit::NetworkResourceLoader::willSendRequestAsync):
(WebKit::NetworkResourceLoader::continueWillSendRequest):
(WebKit::NetworkResourceLoader::continueDidReceiveResponse):
(WebKit::NetworkResourceLoader::didSendData):
(WebKit::NetworkResourceLoader::receivedCancellation):
(WebKit::NetworkResourceLoader::startBufferingTimerIfNeeded):
(WebKit::NetworkResourceLoader::bufferingTimerFired):
(WebKit::NetworkResourceLoader::validateCacheEntry):
(WebKit::NetworkResourceLoader::sendAbortingOnFailure):
(WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
(WebKit::NetworkResourceLoader::continueCanAuthenticateAgainstProtectionSpace):
(WebKit::NetworkResourceLoader::supportsDataArray):
* NetworkProcess/NetworkResourceLoader.h:
(WebKit::NetworkResourceLoader::create):
(WebKit::NetworkResourceLoader::currentRequest):
(WebKit::NetworkResourceLoader::handle):
* NetworkProcess/NetworkSession.h: Added.
(WebKit::NetworkSessionTaskClient::~NetworkSessionTaskClient):
(WebKit::NetworkingDataTask::client):
(WebKit::NetworkingDataTask::clearClient):
(WebKit::NetworkSession::~NetworkSession):
* NetworkProcess/cocoa/NetworkSessionCocoa.mm: Added.
(toNSURLSessionResponseDisposition):
(toNSURLSessionAuthChallengeDisposition):
(-[NetworkSessionDelegate initWithNetworkSession:]):
(-[NetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
(-[NetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
(-[NetworkSessionDelegate URLSession:task:didCompleteWithError:]):
(-[NetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
(-[NetworkSessionDelegate URLSession:dataTask:didReceiveData:]):
(WebKit::NetworkSession::create):
(WebKit::NetworkSession::singleton):
(WebKit::configurationForType):
(WebKit::NetworkSession::NetworkSession):
(WebKit::NetworkSession::createDataTaskWithRequest):
(WebKit::NetworkSession::dataTaskForIdentifier):
(WebKit::NetworkingDataTask::NetworkingDataTask):
(WebKit::NetworkingDataTask::~NetworkingDataTask):
(WebKit::NetworkingDataTask::suspend):
(WebKit::NetworkingDataTask::resume):
(WebKit::NetworkingDataTask::taskIdentifier):
* NetworkProcess/mac/NetworkResourceLoaderMac.mm:
(WebKit::NetworkResourceLoader::willCacheResponseAsync):
* WebKit2.xcodeproj/project.pbxproj:
* config.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191457 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/network/cf/AuthenticationChallenge.h
Source/WebKit2/ChangeLog
Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp
Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp
Source/WebKit2/NetworkProcess/NetworkResourceLoader.h
Source/WebKit2/NetworkProcess/NetworkSession.h [new file with mode: 0644]
Source/WebKit2/NetworkProcess/cocoa/NetworkSessionCocoa.mm [new file with mode: 0644]
Source/WebKit2/NetworkProcess/mac/NetworkResourceLoaderMac.mm
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Source/WebKit2/config.h