Remove dead networking code
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Oct 2016 18:20:23 +0000 (18:20 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Oct 2016 18:20:23 +0000 (18:20 +0000)
https://bugs.webkit.org/show_bug.cgi?id=163263

Reviewed by Daniel Bates.

.:

* Source/cmake/OptionsAppleWin.cmake:

Source/WebCore:

There are no more Cocoa platforms using CFURLConnection.
USE(CFNETWORK) is being replaced by USE(CFURLCONNECTION) and it is only used on the AppleWin port.

No change in behavior.

* WebCore.xcodeproj/project.pbxproj:
* WebCorePrefix.h:
* loader/DocumentLoader.h:
* loader/EmptyClients.h:
* loader/FrameLoaderClient.h:
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
* loader/ResourceLoader.h:
* loader/SubresourceLoader.h:
* loader/cf/ResourceLoaderCFNet.cpp:
* loader/cocoa/SubresourceLoaderCocoa.mm:
(WebCore::SubresourceLoader::willCacheResponse): Deleted.
* loader/mac/DocumentLoaderMac.cpp:
* loader/mac/ResourceLoaderMac.mm:
(WebCore::ResourceLoader::willCacheResponse): Deleted.
* page/mac/PageMac.mm:
(WebCore::Page::platformInitialize):
(WebCore::Page::addSchedulePair):
(WebCore::Page::removeSchedulePair):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForResponseToAuthenticationChallenge):
(WebCore::WebCoreNSURLAuthenticationChallengeClient::create): Deleted.
(WebCore::WebCoreNSURLAuthenticationChallengeClient::WebCoreNSURLAuthenticationChallengeClient): Deleted.
* platform/mac/WebCoreSystemInterface.h:
* platform/network/NetworkStorageSession.h:
* platform/network/ProtectionSpace.h:
* platform/network/ProtectionSpaceBase.cpp:
* platform/network/ResourceHandle.cpp:
* platform/network/ResourceHandle.h:
* platform/network/ResourceHandleClient.cpp:
* platform/network/ResourceHandleClient.h:
(WebCore::ResourceHandleClient::willCacheResponse):
(WebCore::ResourceHandleClient::shouldCacheResponse):
* platform/network/ResourceHandleInternal.h:
(WebCore::ResourceHandleInternal::ResourceHandleInternal):
* platform/network/ResourceRequestBase.cpp:
* platform/network/cf/AuthenticationCF.cpp:
(WebCore::AuthenticationChallenge::AuthenticationChallenge):
(WebCore::createCF):
(WebCore::core):
* platform/network/cf/AuthenticationCF.h:
* platform/network/cf/AuthenticationChallenge.h:
* platform/network/cf/CookieJarCFNet.cpp:
* platform/network/cf/CredentialStorageCFNet.cpp:
(WebCore::CredentialStorage::getFromPersistentStorage):
(WebCore::CredentialStorage::saveToPersistentStorage): Deleted.
* platform/network/cf/LoaderRunLoopCF.cpp:
* platform/network/cf/LoaderRunLoopCF.h:
* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::NetworkStorageSession::cookieStorage):
* platform/network/cf/ProtectionSpaceCFNet.cpp:
* platform/network/cf/ProtectionSpaceCFNet.h:
* platform/network/cf/ResourceError.h:
* platform/network/cf/ResourceErrorCF.cpp:
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::shouldSniffConnectionProperty):
(WebCore::ResourceHandle::createCFURLConnection):
(WebCore::ResourceHandle::start):
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
(WebCore::ResourceHandle::tryHandlePasswordBasedAuthentication):
(WebCore::ResourceHandle::receivedCredential):
(WebCore::ResourceHandle::schedule): Deleted.
(WebCore::ResourceHandle::unschedule): Deleted.
* platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
* platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
* platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupRequest):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace):
* platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.h:
* platform/network/cf/ResourceRequest.h:
(WebCore::ResourceRequest::encodingRequiresPlatformData):
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::findCFURLRequestCopyContentDispositionEncodingFallbackArrayFunction):
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
(WebCore::ResourceRequest::doUpdateResourceRequest):
(WebCore::ResourceRequest::setStorageSession):
(WebCore::findCFURLRequestSetContentDispositionEncodingFallbackArrayFunction): Deleted.
* platform/network/cf/ResourceRequestCFNet.h:
* platform/network/cf/ResourceResponse.h:
(WebCore::ResourceResponse::ResourceResponse):
* platform/network/cf/ResourceResponseCFNet.cpp:
(WebCore::ResourceResponse::cfURLResponse):
(WebCore::ResourceResponse::platformCertificateInfo):
* platform/network/cf/SynchronousLoaderClientCFNet.cpp:
* platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::setupRequest):
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::setupConnectionScheduling):
(WebCore::adjustMIMETypeIfNecessary):
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse):
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::willCacheResponse):
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::canRespondToProtectionSpace):
* platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h:
* platform/network/cocoa/CredentialCocoa.h:
* platform/network/cocoa/CredentialCocoa.mm:
(WebCore::Credential::Credential): Deleted.
(WebCore::Credential::cfCredential): Deleted.
* platform/network/cocoa/ProtectionSpaceCocoa.h:
* platform/network/cocoa/ProtectionSpaceCocoa.mm:
(WebCore::ProtectionSpace::ProtectionSpace): Deleted.
(WebCore::ProtectionSpace::cfSpace): Deleted.
* platform/network/cocoa/ResourceRequestCocoa.mm:
(WebCore::ResourceRequest::nsURLRequest):
* platform/network/cocoa/ResourceResponseCocoa.mm:
(WebCore::ResourceResponse::platformCertificateInfo):
(WebCore::ResourceResponse::nsURLResponse): Deleted.
(WebCore::ResourceResponse::ResourceResponse): Deleted.
* platform/network/ios/QuickLook.h:
* platform/network/ios/QuickLook.mm:
(-[WebQuickLookHandleAsDelegate initWithConnectionDelegate:]): Deleted.
(-[WebQuickLookHandleAsDelegate connection:didReceiveDataArray:]): Deleted.
(-[WebQuickLookHandleAsDelegate connection:didReceiveData:lengthReceived:]): Deleted.
(-[WebQuickLookHandleAsDelegate connectionDidFinishLoading:]): Deleted.
(-[WebQuickLookHandleAsDelegate connection:didFailWithError:]): Deleted.
(-[WebQuickLookHandleAsDelegate detachHandle]): Deleted.
(WebCore::QuickLookHandle::create): Deleted.
(WebCore::QuickLookHandle::cfResponse): Deleted.
* platform/network/ios/ResourceHandleIOS.mm: Removed.
* platform/network/ios/ResourceRequestIOS.mm: Removed.
* platform/network/mac/AuthenticationMac.mm:
(-[WebCoreAuthenticationClientAsChallengeSender setCFChallenge:]): Deleted.
(-[WebCoreAuthenticationClientAsChallengeSender cfChallenge]): Deleted.
(WebCore::core): Deleted.
(WebCore::mac): Deleted.
* platform/network/mac/CookieJarMac.mm:
(WebCore::setCookiesFromDOM):
(WebCore::cookieStorage):
(WebCore::addCookie):
* platform/network/mac/CredentialStorageMac.mm:
* platform/network/mac/FormDataStreamMac.h:
* platform/network/mac/FormDataStreamMac.mm:
* platform/network/mac/ResourceErrorMac.mm:
(NSErrorFromCFError): Deleted.
(WebCore::ResourceError::ResourceError): Deleted.
(WebCore::ResourceError::nsError): Deleted.
(WebCore::ResourceError::operator NSError *): Deleted.
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::continueWillCacheResponse):
(WebCore::ResourceHandle::getConnectionTimingData): Deleted.
* platform/network/mac/ResourceRequestMac.mm: Removed.
* platform/network/mac/SynchronousLoaderClient.mm:
(WebCore::SynchronousLoaderClient::platformBadResponseError):
* platform/network/mac/WebCoreResourceHandleAsDelegate.h:
* platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h:
* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
* platform/network/mac/WebCoreURLResponse.mm:
(WebCore::synthesizeRedirectResponseIfNecessary):
* platform/win/TemporaryLinkStubs.cpp:
* testing/js/WebCoreTestSupportPrefix.h:

Source/WebKit:

* WebCoreSupport/WebResourceLoadScheduler.cpp:
(WebResourceLoadScheduler::scheduleLoad):

Source/WebKit/cf:

* WebCoreSupport/WebInspectorClientCF.cpp:

Source/WebKit/mac:

* Misc/WebDownload.mm:
(-[WebDownload _initWithLoadingCFURLConnection:request:response:delegate:proxy:]): Deleted.
* Misc/WebDownloadInternal.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::convertMainResourceLoadToDownload):
* WebView/WebPreferences.mm:
(+[WebPreferences _setCurrentNetworkLoaderSessionCookieAcceptPolicy:]):
* WebView/WebView.mm:
(-[WebView scheduleInRunLoop:forMode:]):
(-[WebView unscheduleFromRunLoop:forMode:]):

Source/WebKit/win:

* DefaultDownloadDelegate.h:
* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::savePlatformDataToCachedFrame):
* WebCoreSupport/WebFrameNetworkingContext.cpp:
(WebFrameNetworkingContext::ensurePrivateBrowsingSession):
* WebCoreSupport/WebFrameNetworkingContext.h:
* WebCoreSupport/WebPlatformStrategies.cpp:
* WebDownload.h:
* WebError.cpp:
(WebError::localizedDescription):
(WebError::sslPeerCertificate):
* WebError.h:
* WebMutableURLRequest.cpp:
(WebMutableURLRequest::mutableCopy):
* WebURLAuthenticationChallenge.cpp:
(WebURLAuthenticationChallenge::initWithProtectionSpace):
(WebURLAuthenticationChallenge::initWithAuthenticationChallenge):
* WebURLResponse.cpp:
(WebURLResponse::sslPeerCertificate):
* WebURLResponse.h:
* WebView.cpp:
(WebView::setCacheModel):
(WebView::canHandleRequest):
(WebView::notifyPreferencesChanged):
(updateSharedSettingsFromPreferencesIfNeeded):

Source/WebKit2:

* NetworkProcess/Downloads/Download.h:
* NetworkProcess/Downloads/ios/DownloadIOS.mm: Removed.
* NetworkProcess/Downloads/mac/DownloadMac.mm:
* NetworkProcess/NetworkLoad.h:
* NetworkProcess/mac/NetworkLoadMac.mm:
(WebKit::NetworkLoad::willCacheResponseAsync): Deleted.
* Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm:
(WebKit::AuthenticationManager::receivedCredential):
(WebKit::AuthenticationManager::receivedRequestToContinueWithoutCredential):
(WebKit::AuthenticationManager::receivedCancellation):
(WebKit::AuthenticationManager::receivedRequestToPerformDefaultHandling):
(WebKit::AuthenticationManager::receivedChallengeRejection):
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
(IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
* WebKit2.xcodeproj/project.pbxproj:

Source/WTF:

* wtf/Platform.h:
* wtf/SchedulePair.h:
* wtf/SchedulePairMac.mm:

Tools:

* DumpRenderTree/DumpRenderTree.h:
* DumpRenderTree/config.h:
* DumpRenderTree/win/DumpRenderTree.cpp:
(main):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207151 268f45cc-cd09-0410-ab3c-d52691b4dbfc

120 files changed:
ChangeLog
Source/WTF/ChangeLog
Source/WTF/wtf/Platform.h
Source/WTF/wtf/SchedulePair.h
Source/WTF/wtf/SchedulePairMac.mm
Source/WebCore/ChangeLog
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/WebCorePrefix.h
Source/WebCore/loader/DocumentLoader.h
Source/WebCore/loader/EmptyClients.h
Source/WebCore/loader/FrameLoaderClient.h
Source/WebCore/loader/ResourceLoader.cpp
Source/WebCore/loader/ResourceLoader.h
Source/WebCore/loader/SubresourceLoader.h
Source/WebCore/loader/cf/ResourceLoaderCFNet.cpp
Source/WebCore/loader/cocoa/SubresourceLoaderCocoa.mm
Source/WebCore/loader/mac/DocumentLoaderMac.cpp
Source/WebCore/loader/mac/ResourceLoaderMac.mm
Source/WebCore/page/mac/PageMac.mm
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
Source/WebCore/platform/mac/WebCoreSystemInterface.h
Source/WebCore/platform/network/NetworkStorageSession.h
Source/WebCore/platform/network/ProtectionSpace.h
Source/WebCore/platform/network/ProtectionSpaceBase.cpp
Source/WebCore/platform/network/ResourceHandle.cpp
Source/WebCore/platform/network/ResourceHandle.h
Source/WebCore/platform/network/ResourceHandleClient.cpp
Source/WebCore/platform/network/ResourceHandleClient.h
Source/WebCore/platform/network/ResourceHandleInternal.h
Source/WebCore/platform/network/ResourceRequestBase.cpp
Source/WebCore/platform/network/cf/AuthenticationCF.cpp
Source/WebCore/platform/network/cf/AuthenticationCF.h
Source/WebCore/platform/network/cf/AuthenticationChallenge.h
Source/WebCore/platform/network/cf/CookieJarCFNet.cpp
Source/WebCore/platform/network/cf/CredentialStorageCFNet.cpp
Source/WebCore/platform/network/cf/LoaderRunLoopCF.cpp
Source/WebCore/platform/network/cf/LoaderRunLoopCF.h
Source/WebCore/platform/network/cf/NetworkStorageSessionCFNet.cpp
Source/WebCore/platform/network/cf/ProtectionSpaceCFNet.cpp
Source/WebCore/platform/network/cf/ProtectionSpaceCFNet.h
Source/WebCore/platform/network/cf/ResourceError.h
Source/WebCore/platform/network/cf/ResourceErrorCF.cpp
Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp
Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp
Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegate.h
Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp
Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.h
Source/WebCore/platform/network/cf/ResourceRequest.h
Source/WebCore/platform/network/cf/ResourceRequestCFNet.cpp
Source/WebCore/platform/network/cf/ResourceRequestCFNet.h
Source/WebCore/platform/network/cf/ResourceResponse.h
Source/WebCore/platform/network/cf/ResourceResponseCFNet.cpp
Source/WebCore/platform/network/cf/SynchronousLoaderClientCFNet.cpp
Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp
Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h
Source/WebCore/platform/network/cocoa/CredentialCocoa.h
Source/WebCore/platform/network/cocoa/CredentialCocoa.mm
Source/WebCore/platform/network/cocoa/ProtectionSpaceCocoa.h
Source/WebCore/platform/network/cocoa/ProtectionSpaceCocoa.mm
Source/WebCore/platform/network/cocoa/ResourceRequestCocoa.mm
Source/WebCore/platform/network/cocoa/ResourceResponseCocoa.mm
Source/WebCore/platform/network/ios/QuickLook.h
Source/WebCore/platform/network/ios/QuickLook.mm
Source/WebCore/platform/network/ios/ResourceHandleIOS.mm [deleted file]
Source/WebCore/platform/network/ios/ResourceRequestIOS.mm [deleted file]
Source/WebCore/platform/network/mac/AuthenticationMac.mm
Source/WebCore/platform/network/mac/CookieJarMac.mm
Source/WebCore/platform/network/mac/CredentialStorageMac.mm
Source/WebCore/platform/network/mac/FormDataStreamMac.h
Source/WebCore/platform/network/mac/FormDataStreamMac.mm
Source/WebCore/platform/network/mac/ResourceErrorMac.mm
Source/WebCore/platform/network/mac/ResourceHandleMac.mm
Source/WebCore/platform/network/mac/ResourceRequestMac.mm [deleted file]
Source/WebCore/platform/network/mac/SynchronousLoaderClient.mm
Source/WebCore/platform/network/mac/WebCoreResourceHandleAsDelegate.h
Source/WebCore/platform/network/mac/WebCoreResourceHandleAsDelegate.mm
Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h
Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm
Source/WebCore/platform/network/mac/WebCoreURLResponse.mm
Source/WebCore/platform/win/TemporaryLinkStubs.cpp
Source/WebCore/testing/js/WebCoreTestSupportPrefix.h
Source/WebKit/ChangeLog
Source/WebKit/WebCoreSupport/WebResourceLoadScheduler.cpp
Source/WebKit/cf/ChangeLog
Source/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Misc/WebDownload.mm
Source/WebKit/mac/Misc/WebDownloadInternal.h
Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
Source/WebKit/mac/WebView/WebPreferences.mm
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit/win/ChangeLog
Source/WebKit/win/DefaultDownloadDelegate.h
Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit/win/WebCoreSupport/WebFrameNetworkingContext.cpp
Source/WebKit/win/WebCoreSupport/WebFrameNetworkingContext.h
Source/WebKit/win/WebCoreSupport/WebPlatformStrategies.cpp
Source/WebKit/win/WebDownload.h
Source/WebKit/win/WebError.cpp
Source/WebKit/win/WebError.h
Source/WebKit/win/WebMutableURLRequest.cpp
Source/WebKit/win/WebURLAuthenticationChallenge.cpp
Source/WebKit/win/WebURLResponse.cpp
Source/WebKit/win/WebURLResponse.h
Source/WebKit/win/WebView.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/NetworkProcess/Downloads/Download.h
Source/WebKit2/NetworkProcess/Downloads/mac/DownloadMac.mm
Source/WebKit2/NetworkProcess/NetworkLoad.h
Source/WebKit2/NetworkProcess/mac/NetworkLoadMac.mm
Source/WebKit2/Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm
Source/WebKit2/Shared/WebProcessCreationParameters.cpp
Source/WebKit2/Shared/WebProcessCreationParameters.h
Source/WebKit2/Shared/mac/WebCoreArgumentCodersMac.mm
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Source/cmake/OptionsAppleWin.cmake
Tools/ChangeLog
Tools/DumpRenderTree/DumpRenderTree.h
Tools/DumpRenderTree/config.h
Tools/DumpRenderTree/win/DumpRenderTree.cpp

index 4bc48db..5e6574c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2016-10-11  Alex Christensen  <achristensen@webkit.org>
+
+        Remove dead networking code
+        https://bugs.webkit.org/show_bug.cgi?id=163263
+
+        Reviewed by Daniel Bates.
+
+        * Source/cmake/OptionsAppleWin.cmake:
+
 2016-10-11  Konstantin Tokarev  <annulen@yandex.ru>
 
         [cmake] Make INDEXED_DATABASE_IN_WORKERS depending on INDEXED_DATABASE
index 3b252ad..cfa2ec9 100644 (file)
@@ -1,3 +1,14 @@
+2016-10-11  Alex Christensen  <achristensen@webkit.org>
+
+        Remove dead networking code
+        https://bugs.webkit.org/show_bug.cgi?id=163263
+
+        Reviewed by Daniel Bates.
+
+        * wtf/Platform.h:
+        * wtf/SchedulePair.h:
+        * wtf/SchedulePairMac.mm:
+
 2016-10-10  Zan Dobersek  <zdobersek@igalia.com>
 
         Add ENABLE_ENCRYPTED_MEDIA configuration option
index 99cc71f..790e837 100644 (file)
 
 #if PLATFORM(IOS)
 
-#if USE(APPLE_INTERNAL_SDK) && __IPHONE_OS_VERSION_MIN_REQUIRED < 100000
-#define USE_CFNETWORK 1
-#endif
-
 #define HAVE_NETWORK_EXTENSION 1
 #define HAVE_READLINE 1
 #define USE_UIKIT_EDITING 1
 #endif
 
 #if PLATFORM(WIN) && !USE(WINGDI) && !PLATFORM(WIN_CAIRO)
-#define USE_CFNETWORK 1
+#define USE_CFURLCONNECTION 1
 #endif
 
-#if USE(CFNETWORK) || PLATFORM(COCOA)
+#if USE(CFURLCONNECTION) || PLATFORM(COCOA)
 #define USE_CFURLCACHE 1
 #endif
 
 #define USE_PROTECTION_SPACE_AUTH_CALLBACK 1
 #endif
 
-/* Set up a define for a common error that is intended to cause a build error -- thus the space after Error. */
-#define WTF_PLATFORM_CFNETWORK Error USE_macro_should_be_used_with_CFNETWORK
-
 #if PLATFORM(COCOA) && HAVE(ACCESSIBILITY)
 #define USE_ACCESSIBILITY_CONTEXT_MENUS 1
 #endif
index 36fa647..8be9cf4 100644 (file)
@@ -35,7 +35,7 @@
 #include <wtf/text/StringHash.h>
 #include <wtf/text/WTFString.h>
 
-#if PLATFORM(COCOA) && !USE(CFNETWORK)
+#if PLATFORM(COCOA)
 OBJC_CLASS NSRunLoop;
 #endif
 
@@ -45,7 +45,7 @@ class SchedulePair : public ThreadSafeRefCounted<SchedulePair> {
 public:
     static Ref<SchedulePair> create(CFRunLoopRef runLoop, CFStringRef mode) { return adoptRef(*new SchedulePair(runLoop, mode)); }
 
-#if PLATFORM(COCOA) && !USE(CFNETWORK)
+#if PLATFORM(COCOA)
     static Ref<SchedulePair> create(NSRunLoop* runLoop, CFStringRef mode) { return adoptRef(*new SchedulePair(runLoop, mode)); }
     NSRunLoop* nsRunLoop() const { return m_nsRunLoop.get(); }
 #endif
@@ -63,7 +63,7 @@ private:
             m_mode = adoptCF(CFStringCreateCopy(0, mode));
     }
 
-#if PLATFORM(COCOA) && !USE(CFNETWORK)
+#if PLATFORM(COCOA)
     WTF_EXPORT_PRIVATE SchedulePair(NSRunLoop*, CFStringRef);
     RetainPtr<NSRunLoop*> m_nsRunLoop;
 #endif
index b1f4437..f7f48ed 100644 (file)
@@ -29,8 +29,6 @@
 #include "config.h"
 #include "SchedulePair.h"
 
-#if !USE(CFNETWORK)
-
 namespace WTF {
 
 SchedulePair::SchedulePair(NSRunLoop* runLoop, CFStringRef mode)
@@ -42,5 +40,3 @@ SchedulePair::SchedulePair(NSRunLoop* runLoop, CFStringRef mode)
 }
 
 } // namespace
-
-#endif
index ec46d07..fdc1c44 100644 (file)
@@ -1,3 +1,167 @@
+2016-10-11  Alex Christensen  <achristensen@webkit.org>
+
+        Remove dead networking code
+        https://bugs.webkit.org/show_bug.cgi?id=163263
+
+        Reviewed by Daniel Bates.
+
+        There are no more Cocoa platforms using CFURLConnection.
+        USE(CFNETWORK) is being replaced by USE(CFURLCONNECTION) and it is only used on the AppleWin port.
+
+        No change in behavior.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * WebCorePrefix.h:
+        * loader/DocumentLoader.h:
+        * loader/EmptyClients.h:
+        * loader/FrameLoaderClient.h:
+        * loader/ResourceLoader.cpp:
+        (WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
+        * loader/ResourceLoader.h:
+        * loader/SubresourceLoader.h:
+        * loader/cf/ResourceLoaderCFNet.cpp:
+        * loader/cocoa/SubresourceLoaderCocoa.mm:
+        (WebCore::SubresourceLoader::willCacheResponse): Deleted.
+        * loader/mac/DocumentLoaderMac.cpp:
+        * loader/mac/ResourceLoaderMac.mm:
+        (WebCore::ResourceLoader::willCacheResponse): Deleted.
+        * page/mac/PageMac.mm:
+        (WebCore::Page::platformInitialize):
+        (WebCore::Page::addSchedulePair):
+        (WebCore::Page::removeSchedulePair):
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+        (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForResponseToAuthenticationChallenge):
+        (WebCore::WebCoreNSURLAuthenticationChallengeClient::create): Deleted.
+        (WebCore::WebCoreNSURLAuthenticationChallengeClient::WebCoreNSURLAuthenticationChallengeClient): Deleted.
+        * platform/mac/WebCoreSystemInterface.h:
+        * platform/network/NetworkStorageSession.h:
+        * platform/network/ProtectionSpace.h:
+        * platform/network/ProtectionSpaceBase.cpp:
+        * platform/network/ResourceHandle.cpp:
+        * platform/network/ResourceHandle.h:
+        * platform/network/ResourceHandleClient.cpp:
+        * platform/network/ResourceHandleClient.h:
+        (WebCore::ResourceHandleClient::willCacheResponse):
+        (WebCore::ResourceHandleClient::shouldCacheResponse):
+        * platform/network/ResourceHandleInternal.h:
+        (WebCore::ResourceHandleInternal::ResourceHandleInternal):
+        * platform/network/ResourceRequestBase.cpp:
+        * platform/network/cf/AuthenticationCF.cpp:
+        (WebCore::AuthenticationChallenge::AuthenticationChallenge):
+        (WebCore::createCF):
+        (WebCore::core):
+        * platform/network/cf/AuthenticationCF.h:
+        * platform/network/cf/AuthenticationChallenge.h:
+        * platform/network/cf/CookieJarCFNet.cpp:
+        * platform/network/cf/CredentialStorageCFNet.cpp:
+        (WebCore::CredentialStorage::getFromPersistentStorage):
+        (WebCore::CredentialStorage::saveToPersistentStorage): Deleted.
+        * platform/network/cf/LoaderRunLoopCF.cpp:
+        * platform/network/cf/LoaderRunLoopCF.h:
+        * platform/network/cf/NetworkStorageSessionCFNet.cpp:
+        (WebCore::NetworkStorageSession::cookieStorage):
+        * platform/network/cf/ProtectionSpaceCFNet.cpp:
+        * platform/network/cf/ProtectionSpaceCFNet.h:
+        * platform/network/cf/ResourceError.h:
+        * platform/network/cf/ResourceErrorCF.cpp:
+        * platform/network/cf/ResourceHandleCFNet.cpp:
+        (WebCore::shouldSniffConnectionProperty):
+        (WebCore::ResourceHandle::createCFURLConnection):
+        (WebCore::ResourceHandle::start):
+        (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
+        (WebCore::ResourceHandle::tryHandlePasswordBasedAuthentication):
+        (WebCore::ResourceHandle::receivedCredential):
+        (WebCore::ResourceHandle::schedule): Deleted.
+        (WebCore::ResourceHandle::unschedule): Deleted.
+        * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
+        * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
+        * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
+        (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupRequest):
+        (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
+        (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace):
+        * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.h:
+        * platform/network/cf/ResourceRequest.h:
+        (WebCore::ResourceRequest::encodingRequiresPlatformData):
+        * platform/network/cf/ResourceRequestCFNet.cpp:
+        (WebCore::findCFURLRequestCopyContentDispositionEncodingFallbackArrayFunction):
+        (WebCore::ResourceRequest::doUpdatePlatformRequest):
+        (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
+        (WebCore::ResourceRequest::doUpdateResourceRequest):
+        (WebCore::ResourceRequest::setStorageSession):
+        (WebCore::findCFURLRequestSetContentDispositionEncodingFallbackArrayFunction): Deleted.
+        * platform/network/cf/ResourceRequestCFNet.h:
+        * platform/network/cf/ResourceResponse.h:
+        (WebCore::ResourceResponse::ResourceResponse):
+        * platform/network/cf/ResourceResponseCFNet.cpp:
+        (WebCore::ResourceResponse::cfURLResponse):
+        (WebCore::ResourceResponse::platformCertificateInfo):
+        * platform/network/cf/SynchronousLoaderClientCFNet.cpp:
+        * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
+        (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::setupRequest):
+        (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::setupConnectionScheduling):
+        (WebCore::adjustMIMETypeIfNecessary):
+        (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse):
+        (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::willCacheResponse):
+        (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::canRespondToProtectionSpace):
+        * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h:
+        * platform/network/cocoa/CredentialCocoa.h:
+        * platform/network/cocoa/CredentialCocoa.mm:
+        (WebCore::Credential::Credential): Deleted.
+        (WebCore::Credential::cfCredential): Deleted.
+        * platform/network/cocoa/ProtectionSpaceCocoa.h:
+        * platform/network/cocoa/ProtectionSpaceCocoa.mm:
+        (WebCore::ProtectionSpace::ProtectionSpace): Deleted.
+        (WebCore::ProtectionSpace::cfSpace): Deleted.
+        * platform/network/cocoa/ResourceRequestCocoa.mm:
+        (WebCore::ResourceRequest::nsURLRequest):
+        * platform/network/cocoa/ResourceResponseCocoa.mm:
+        (WebCore::ResourceResponse::platformCertificateInfo):
+        (WebCore::ResourceResponse::nsURLResponse): Deleted.
+        (WebCore::ResourceResponse::ResourceResponse): Deleted.
+        * platform/network/ios/QuickLook.h:
+        * platform/network/ios/QuickLook.mm:
+        (-[WebQuickLookHandleAsDelegate initWithConnectionDelegate:]): Deleted.
+        (-[WebQuickLookHandleAsDelegate connection:didReceiveDataArray:]): Deleted.
+        (-[WebQuickLookHandleAsDelegate connection:didReceiveData:lengthReceived:]): Deleted.
+        (-[WebQuickLookHandleAsDelegate connectionDidFinishLoading:]): Deleted.
+        (-[WebQuickLookHandleAsDelegate connection:didFailWithError:]): Deleted.
+        (-[WebQuickLookHandleAsDelegate detachHandle]): Deleted.
+        (WebCore::QuickLookHandle::create): Deleted.
+        (WebCore::QuickLookHandle::cfResponse): Deleted.
+        * platform/network/ios/ResourceHandleIOS.mm: Removed.
+        * platform/network/ios/ResourceRequestIOS.mm: Removed.
+        * platform/network/mac/AuthenticationMac.mm:
+        (-[WebCoreAuthenticationClientAsChallengeSender setCFChallenge:]): Deleted.
+        (-[WebCoreAuthenticationClientAsChallengeSender cfChallenge]): Deleted.
+        (WebCore::core): Deleted.
+        (WebCore::mac): Deleted.
+        * platform/network/mac/CookieJarMac.mm:
+        (WebCore::setCookiesFromDOM):
+        (WebCore::cookieStorage):
+        (WebCore::addCookie):
+        * platform/network/mac/CredentialStorageMac.mm:
+        * platform/network/mac/FormDataStreamMac.h:
+        * platform/network/mac/FormDataStreamMac.mm:
+        * platform/network/mac/ResourceErrorMac.mm:
+        (NSErrorFromCFError): Deleted.
+        (WebCore::ResourceError::ResourceError): Deleted.
+        (WebCore::ResourceError::nsError): Deleted.
+        (WebCore::ResourceError::operator NSError *): Deleted.
+        * platform/network/mac/ResourceHandleMac.mm:
+        (WebCore::ResourceHandle::continueWillCacheResponse):
+        (WebCore::ResourceHandle::getConnectionTimingData): Deleted.
+        * platform/network/mac/ResourceRequestMac.mm: Removed.
+        * platform/network/mac/SynchronousLoaderClient.mm:
+        (WebCore::SynchronousLoaderClient::platformBadResponseError):
+        * platform/network/mac/WebCoreResourceHandleAsDelegate.h:
+        * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
+        * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h:
+        * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
+        * platform/network/mac/WebCoreURLResponse.mm:
+        (WebCore::synthesizeRedirectResponseIfNecessary):
+        * platform/win/TemporaryLinkStubs.cpp:
+        * testing/js/WebCoreTestSupportPrefix.h:
+
 2016-10-10  Sam Weinig  <sam@webkit.org>
 
         Use IDLTypes in more places
index a9762db..dc1d31e 100644 (file)
                514C764F0CE9234E007EF3CD /* FormDataStreamMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 514C76450CE9234E007EF3CD /* FormDataStreamMac.mm */; };
                514C76500CE9234E007EF3CD /* ResourceErrorMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 514C76460CE9234E007EF3CD /* ResourceErrorMac.mm */; };
                514C76510CE9234E007EF3CD /* ResourceHandleMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 514C76470CE9234E007EF3CD /* ResourceHandleMac.mm */; };
-               514C76530CE9234E007EF3CD /* ResourceRequestMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 514C76490CE9234E007EF3CD /* ResourceRequestMac.mm */; };
                514C766D0CE923A1007EF3CD /* CredentialBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 514C76580CE923A1007EF3CD /* CredentialBase.cpp */; };
                514C766E0CE923A1007EF3CD /* Credential.h in Headers */ = {isa = PBXBuildFile; fileRef = 514C76590CE923A1007EF3CD /* Credential.h */; settings = {ATTRIBUTES = (Private, ); }; };
                514C766F0CE923A1007EF3CD /* FormData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 514C765A0CE923A1007EF3CD /* FormData.cpp */; };
                7D4C96DD1AD4483500365A50 /* JSFetchHeaders.h in Headers */ = {isa = PBXBuildFile; fileRef = 7D4C96D91AD4483500365A50 /* JSFetchHeaders.h */; };
                7D741BDA177226AA00859170 /* CSSValueKeywords.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 6565814809D13043000E61D7 /* CSSValueKeywords.h */; };
                7E37EF2E1339208800B29250 /* SubresourceLoaderCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7E37EF2D1339208800B29250 /* SubresourceLoaderCF.cpp */; };
-               7E428CE513E3407F003B661C /* ResourceHandleIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7E428CE413E3407F003B661C /* ResourceHandleIOS.mm */; };
                7E46F6FA1627A2CA00062223 /* JSOESElementIndexUint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7E46F6F81627A2C900062223 /* JSOESElementIndexUint.cpp */; };
                7E46F6FB1627A2CA00062223 /* JSOESElementIndexUint.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E46F6F91627A2C900062223 /* JSOESElementIndexUint.h */; };
                7E474E1E12494DC900235364 /* SQLiteDatabaseTrackerClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E474E1B12494DC900235364 /* SQLiteDatabaseTrackerClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
                7E66E23416D6EB6C00F7E7FF /* WebGLCompressedTextureATC.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E66E23216D6EB6C00F7E7FF /* WebGLCompressedTextureATC.h */; };
                7E66E23417E6EB6C00F7E7FF /* WebGLCompressedTexturePVRTC.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E66E23217E6EB6C00F7E7FF /* WebGLCompressedTexturePVRTC.h */; };
                7E7DE1FD195CEF260035363B /* ResourceRequestCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7E7DE1FC195CEF260035363B /* ResourceRequestCocoa.mm */; };
-               7E7DE202195CEFCD0035363B /* ResourceRequestIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7E7DE201195CEFCD0035363B /* ResourceRequestIOS.mm */; };
                7E8FADC4199A95B100714968 /* SubresourceLoaderCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7E8FADC3199A95B100714968 /* SubresourceLoaderCocoa.mm */; };
                7E99AF510B13846468FB01A5 /* WindowFocusAllowedIndicator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7E99AF520B13846468FB01A5 /* WindowFocusAllowedIndicator.cpp */; };
                7E99AF530B13846468FB01A5 /* WindowFocusAllowedIndicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E99AF540B13846468FB01A5 /* WindowFocusAllowedIndicator.h */; settings = {ATTRIBUTES = (Private, ); }; };
                7EE6846912D26E3800E79415 /* LoaderRunLoopCF.h in Headers */ = {isa = PBXBuildFile; fileRef = 7EE6845612D26E3800E79415 /* LoaderRunLoopCF.h */; };
                7EE6846A12D26E3800E79415 /* ResourceError.h in Headers */ = {isa = PBXBuildFile; fileRef = 7EE6845712D26E3800E79415 /* ResourceError.h */; settings = {ATTRIBUTES = (Private, ); }; };
                7EE6846B12D26E3800E79415 /* ResourceErrorCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7EE6845812D26E3800E79415 /* ResourceErrorCF.cpp */; };
-               7EE6846C12D26E3800E79415 /* ResourceHandleCFNet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7EE6845912D26E3800E79415 /* ResourceHandleCFNet.cpp */; };
                7EE6846D12D26E3800E79415 /* ResourceRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 7EE6845A12D26E3800E79415 /* ResourceRequest.h */; settings = {ATTRIBUTES = (Private, ); }; };
                7EE6846E12D26E3800E79415 /* ResourceRequestCFNet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7EE6845B12D26E3800E79415 /* ResourceRequestCFNet.cpp */; };
                7EE6846F12D26E3800E79415 /* ResourceRequestCFNet.h in Headers */ = {isa = PBXBuildFile; fileRef = 7EE6845C12D26E3800E79415 /* ResourceRequestCFNet.h */; settings = {ATTRIBUTES = (Private, ); }; };
                514C76450CE9234E007EF3CD /* FormDataStreamMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FormDataStreamMac.mm; sourceTree = "<group>"; };
                514C76460CE9234E007EF3CD /* ResourceErrorMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ResourceErrorMac.mm; sourceTree = "<group>"; };
                514C76470CE9234E007EF3CD /* ResourceHandleMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ResourceHandleMac.mm; sourceTree = "<group>"; };
-               514C76490CE9234E007EF3CD /* ResourceRequestMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ResourceRequestMac.mm; sourceTree = "<group>"; };
                514C76580CE923A1007EF3CD /* CredentialBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CredentialBase.cpp; sourceTree = "<group>"; };
                514C76590CE923A1007EF3CD /* Credential.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Credential.h; sourceTree = "<group>"; };
                514C765A0CE923A1007EF3CD /* FormData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FormData.cpp; sourceTree = "<group>"; };
                7D4C96D81AD4483500365A50 /* JSFetchHeaders.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSFetchHeaders.cpp; sourceTree = "<group>"; };
                7D4C96D91AD4483500365A50 /* JSFetchHeaders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSFetchHeaders.h; sourceTree = "<group>"; };
                7E37EF2D1339208800B29250 /* SubresourceLoaderCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SubresourceLoaderCF.cpp; sourceTree = "<group>"; };
-               7E428CE413E3407F003B661C /* ResourceHandleIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ResourceHandleIOS.mm; sourceTree = "<group>"; };
                7E46F6F81627A2C900062223 /* JSOESElementIndexUint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSOESElementIndexUint.cpp; sourceTree = "<group>"; };
                7E46F6F91627A2C900062223 /* JSOESElementIndexUint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSOESElementIndexUint.h; sourceTree = "<group>"; };
                7E474E1B12494DC900235364 /* SQLiteDatabaseTrackerClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SQLiteDatabaseTrackerClient.h; sourceTree = "<group>"; };
                7E66E23216D6EB6C00F7E7FF /* WebGLCompressedTextureATC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGLCompressedTextureATC.h; sourceTree = "<group>"; };
                7E66E23217E6EB6C00F7E7FF /* WebGLCompressedTexturePVRTC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGLCompressedTexturePVRTC.h; sourceTree = "<group>"; };
                7E7DE1FC195CEF260035363B /* ResourceRequestCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ResourceRequestCocoa.mm; sourceTree = "<group>"; };
-               7E7DE201195CEFCD0035363B /* ResourceRequestIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ResourceRequestIOS.mm; sourceTree = "<group>"; };
                7E8FADC3199A95B100714968 /* SubresourceLoaderCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SubresourceLoaderCocoa.mm; sourceTree = "<group>"; };
                7E99AF520B13846468FB01A5 /* WindowFocusAllowedIndicator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WindowFocusAllowedIndicator.cpp; sourceTree = "<group>"; };
                7E99AF540B13846468FB01A5 /* WindowFocusAllowedIndicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WindowFocusAllowedIndicator.h; sourceTree = "<group>"; };
                7EE6845612D26E3800E79415 /* LoaderRunLoopCF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoaderRunLoopCF.h; sourceTree = "<group>"; };
                7EE6845712D26E3800E79415 /* ResourceError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceError.h; sourceTree = "<group>"; };
                7EE6845812D26E3800E79415 /* ResourceErrorCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResourceErrorCF.cpp; sourceTree = "<group>"; };
-               7EE6845912D26E3800E79415 /* ResourceHandleCFNet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResourceHandleCFNet.cpp; sourceTree = "<group>"; };
                7EE6845A12D26E3800E79415 /* ResourceRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceRequest.h; sourceTree = "<group>"; };
                7EE6845B12D26E3800E79415 /* ResourceRequestCFNet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResourceRequestCFNet.cpp; sourceTree = "<group>"; };
                7EE6845C12D26E3800E79415 /* ResourceRequestCFNet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceRequestCFNet.h; sourceTree = "<group>"; };
                                442AF7A7102CDDEA008FD4D3 /* QuickLook.h */,
                                442AF7A8102CDDEA008FD4D3 /* QuickLook.mm */,
                                A10DBF4618F92317000D70C6 /* QuickLookHandleClient.h */,
-                               7E428CE413E3407F003B661C /* ResourceHandleIOS.mm */,
-                               7E7DE201195CEFCD0035363B /* ResourceRequestIOS.mm */,
                                44A20DB80F84166C00B3E1FE /* WebCoreURLResponseIOS.h */,
                                444D4E210F708B2E003158E0 /* WebCoreURLResponseIOS.mm */,
                        );
                                1A7FA6470DDA3CBA0028F8A5 /* NetworkStateNotifierMac.cpp */,
                                514C76460CE9234E007EF3CD /* ResourceErrorMac.mm */,
                                514C76470CE9234E007EF3CD /* ResourceHandleMac.mm */,
-                               514C76490CE9234E007EF3CD /* ResourceRequestMac.mm */,
                                E180811416FCF9CB00B80D07 /* SynchronousLoaderClient.mm */,
                                1FAFBF1615A5FA5200083A20 /* UTIUtilities.h */,
                                1FAFBF1715A5FA5200083A20 /* UTIUtilities.mm */,
                                1AF8E1C1125673E000230FF7 /* ProxyServerCFNet.cpp */,
                                7EE6845712D26E3800E79415 /* ResourceError.h */,
                                7EE6845812D26E3800E79415 /* ResourceErrorCF.cpp */,
-                               7EE6845912D26E3800E79415 /* ResourceHandleCFNet.cpp */,
                                26FAE4C81852E3A5004C8C46 /* ResourceHandleCFURLConnectionDelegate.cpp */,
                                26FAE4C91852E3A5004C8C46 /* ResourceHandleCFURLConnectionDelegate.h */,
                                26C15CF41857E15D00F15C03 /* ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp */,
                                7EE6846B12D26E3800E79415 /* ResourceErrorCF.cpp in Sources */,
                                514C76500CE9234E007EF3CD /* ResourceErrorMac.mm in Sources */,
                                514C76780CE923A1007EF3CD /* ResourceHandle.cpp in Sources */,
-                               7EE6846C12D26E3800E79415 /* ResourceHandleCFNet.cpp in Sources */,
                                26FAE4CC1852E3A5004C8C46 /* ResourceHandleCFURLConnectionDelegate.cpp in Sources */,
                                26C15CF61857E15D00F15C03 /* ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp in Sources */,
                                E1BA003116FB92AC00BA7A35 /* ResourceHandleClient.cpp in Sources */,
-                               7E428CE513E3407F003B661C /* ResourceHandleIOS.mm in Sources */,
                                514C76510CE9234E007EF3CD /* ResourceHandleMac.mm in Sources */,
                                93E227E30AF589AD00D48324 /* ResourceLoader.cpp in Sources */,
                                7EE6847512D26E7000E79415 /* ResourceLoaderCFNet.cpp in Sources */,
                                514C767C0CE923A1007EF3CD /* ResourceRequestBase.cpp in Sources */,
                                7EE6846E12D26E3800E79415 /* ResourceRequestCFNet.cpp in Sources */,
                                7E7DE1FD195CEF260035363B /* ResourceRequestCocoa.mm in Sources */,
-                               7E7DE202195CEFCD0035363B /* ResourceRequestIOS.mm in Sources */,
-                               514C76530CE9234E007EF3CD /* ResourceRequestMac.mm in Sources */,
                                514C767E0CE923A1007EF3CD /* ResourceResponseBase.cpp in Sources */,
                                7EE6847112D26E3800E79415 /* ResourceResponseCFNet.cpp in Sources */,
                                A1F78D0C1C25424C00245446 /* ResourceResponseCocoa.mm in Sources */,
index c4ee94c..68d7d87 100644 (file)
@@ -18,7 +18,7 @@
  *
  */
 
-/* This prefix file should contain only: 
+/* This prefix file should contain only:
  *    1) files to precompile for faster builds
  *    2) in one case at least: OS-X-specific performance bug workarounds
  *    3) the special trick to catch us using new or delete without including "config.h"
 #else
 
 #if OS(WINDOWS)
-#if USE(CG)
 
+#if USE(CG)
 // FIXME <rdar://problem/8208868> Remove support for obsolete ColorSync API, CoreServices header in CoreGraphics
 // We can remove this once the new ColorSync APIs are available in an internal Safari SDK.
 #include <ColorSync/ColorSync.h>
 #define OBSOLETE_COLORSYNC_API
 #endif
 #endif
-#if USE(CFNETWORK)
-/* Windows doesn't include CFNetwork.h via CoreServices.h, so we do
-   it explicitly here to make Windows more consistent with Mac. */
+
+#if USE(CFURLCONNECTION)
 #include <CFNetwork/CFNetwork.h>
 // On Windows, dispatch.h needs to be included before certain CFNetwork headers.
 #include <dispatch/dispatch.h>
 #endif
+
 #include <windows.h>
-#else
-#if !PLATFORM(IOS)
+
+#elif !PLATFORM(IOS)
+
 #include <CoreServices/CoreServices.h>
-#endif // !PLATFORM(IOS)
-#endif // OS(WINDOWS)
+
+#endif
+
 
 #endif
 
index c346fec..1623bec 100644 (file)
@@ -55,7 +55,7 @@
 #include "QuickLook.h"
 #endif
 
-#if PLATFORM(COCOA) && !USE(CFNETWORK)
+#if PLATFORM(COCOA)
 #include <wtf/SchedulePair.h>
 #endif
 
@@ -145,7 +145,7 @@ namespace WebCore {
         WEBCORE_EXPORT void setTitle(const StringWithDirection&);
         const String& overrideEncoding() const { return m_overrideEncoding; }
 
-#if PLATFORM(COCOA) && !USE(CFNETWORK)
+#if PLATFORM(COCOA)
         void schedule(SchedulePair&);
         void unschedule(SchedulePair&);
 #endif
index e6f18df..93697d8 100644 (file)
@@ -403,7 +403,7 @@ public:
     RemoteAXObjectRef accessibilityRemoteObject() override { return nullptr; }
     NSCachedURLResponse* willCacheResponse(DocumentLoader*, unsigned long, NSCachedURLResponse* response) const override { return response; }
 #endif
-#if PLATFORM(WIN) && USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
     // FIXME: Windows should use willCacheResponse - <https://bugs.webkit.org/show_bug.cgi?id=57257>.
     bool shouldCacheResponse(DocumentLoader*, unsigned long, const ResourceResponse&, const unsigned char*, unsigned long long) override { return true; }
 #endif
index 37992e1..0b36b46 100644 (file)
@@ -297,7 +297,7 @@ namespace WebCore {
         virtual NSCachedURLResponse* willCacheResponse(DocumentLoader*, unsigned long identifier, NSCachedURLResponse*) const = 0;
         virtual NSDictionary *dataDetectionContext() { return nullptr; }
 #endif
-#if PLATFORM(WIN) && USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
         // FIXME: Windows should use willCacheResponse - <https://bugs.webkit.org/show_bug.cgi?id=57257>.
         virtual bool shouldCacheResponse(DocumentLoader*, unsigned long identifier, const ResourceResponse&, const unsigned char* data, unsigned long long length) = 0;
 #endif
index 5d83dff..e2466ca 100644 (file)
@@ -713,14 +713,8 @@ void ResourceLoader::didReceiveAuthenticationChallenge(const AuthenticationChall
             return;
         }
     }
-    // Only these platforms provide a way to continue without credentials.
-    // If we can't continue with credentials, we need to cancel the load altogether.
-#if PLATFORM(COCOA) || USE(CFNETWORK) || USE(CURL) || PLATFORM(GTK) || PLATFORM(EFL)
     challenge.authenticationClient()->receivedRequestToContinueWithoutCredential(challenge);
     ASSERT(!m_handle || !m_handle->hasAuthenticationChallenge());
-#else
-    didFail(blockedError());
-#endif
 }
 
 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)
@@ -747,7 +741,7 @@ void ResourceLoader::receivedCancellation(const AuthenticationChallenge&)
     cancel();
 }
 
-#if PLATFORM(COCOA) && !USE(CFNETWORK)
+#if PLATFORM(COCOA)
 
 void ResourceLoader::schedule(SchedulePair& pair)
 {
index e5a6425..5591bdd 100644 (file)
@@ -143,7 +143,7 @@ public:
 
     const LoadTiming& loadTiming() { return m_loadTiming; }
 
-#if PLATFORM(COCOA) && !USE(CFNETWORK)
+#if PLATFORM(COCOA)
     void schedule(WTF::SchedulePair&);
     void unschedule(WTF::SchedulePair&);
 #endif
@@ -163,12 +163,9 @@ protected:
 
     const ResourceLoaderOptions& options() { return m_options; }
 
-#if PLATFORM(COCOA) && !USE(CFNETWORK)
+#if PLATFORM(COCOA)
     NSCachedURLResponse* willCacheResponse(ResourceHandle*, NSCachedURLResponse*) override;
 #endif
-#if PLATFORM(COCOA) && USE(CFNETWORK)
-    CFCachedURLResponseRef willCacheResponse(ResourceHandle*, CFCachedURLResponseRef) override;
-#endif
 
     virtual void willSendRequestInternal(ResourceRequest&, const ResourceResponse& redirectResponse);
 
@@ -208,7 +205,7 @@ private:
 #if PLATFORM(IOS)
     RetainPtr<CFDictionaryRef> connectionProperties(ResourceHandle*) override;
 #endif
-#if PLATFORM(WIN) && USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
     // FIXME: Windows should use willCacheResponse - <https://bugs.webkit.org/show_bug.cgi?id=57257>.
     bool shouldCacheResponse(ResourceHandle*, CFCachedURLResponseRef) override;
 #endif
index 840c3f5..0ad4669 100644 (file)
@@ -74,12 +74,9 @@ private:
     void willCancel(const ResourceError&) override;
     void didCancel(const ResourceError&) override;
 
-#if PLATFORM(COCOA) && !USE(CFNETWORK)
+#if PLATFORM(COCOA)
     NSCachedURLResponse *willCacheResponse(ResourceHandle*, NSCachedURLResponse*) override;
 #endif
-#if PLATFORM(COCOA) && USE(CFNETWORK)
-    CFCachedURLResponseRef willCacheResponse(ResourceHandle*, CFCachedURLResponseRef) override;
-#endif
 
 #if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
     bool supportsDataArray() override { return true; }
index 317b6ed..38edfa5 100644 (file)
 #include "config.h"
 #include "ResourceLoader.h"
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 
 #include "FrameLoader.h"
 #include "FrameLoaderClient.h"
 
 namespace WebCore {
 
-#if PLATFORM(WIN)
-
 bool ResourceLoader::shouldCacheResponse(ResourceHandle*, CFCachedURLResponseRef cachedResponse)
 {
     if (m_options.sendLoadCallbacks == DoNotSendCallbacks)
@@ -45,8 +43,6 @@ bool ResourceLoader::shouldCacheResponse(ResourceHandle*, CFCachedURLResponseRef
     return frameLoader()->client().shouldCacheResponse(documentLoader(), identifier(), response, CFDataGetBytePtr(data), CFDataGetLength(data));
 }
 
-#endif
-
 } // namespace WebCore
 
-#endif // USE(CFNETWORK)
+#endif // USE(CFURLCONNECTION)
index c10095c..f8af303 100644 (file)
 
 namespace WebCore {
 
-#if USE(CFNETWORK)
-
-CFCachedURLResponseRef SubresourceLoader::willCacheResponse(ResourceHandle* handle, CFCachedURLResponseRef cachedResponse)
-{
-    DiskCacheMonitor::monitorFileBackingStoreCreation(request(), m_resource->sessionID(), cachedResponse);
-    if (!m_resource->shouldCacheResponse(CFCachedURLResponseGetWrappedResponse(cachedResponse)))
-        return nullptr;
-    return ResourceLoader::willCacheResponse(handle, cachedResponse);
-}
-
-#else
-
 NSCachedURLResponse* SubresourceLoader::willCacheResponse(ResourceHandle* handle, NSCachedURLResponse* response)
 {
     DiskCacheMonitor::monitorFileBackingStoreCreation(request(), m_resource->sessionID(), [response _CFCachedURLResponse]);
@@ -55,6 +43,4 @@ NSCachedURLResponse* SubresourceLoader::willCacheResponse(ResourceHandle* handle
     return ResourceLoader::willCacheResponse(handle, response);
 }
 
-#endif
-
 }
index 58d50e6..1b09a7a 100644 (file)
@@ -33,8 +33,6 @@
 
 namespace WebCore {
 
-#if !USE(CFNETWORK)
-
 static void scheduleAll(const ResourceLoaderMap& loaders, SchedulePair& pair)
 {
     Vector<RefPtr<ResourceLoader>> loadersCopy;
@@ -69,6 +67,4 @@ void DocumentLoader::unschedule(SchedulePair& pair)
     unscheduleAll(m_multipartSubresourceLoaders, pair);
 }
 
-#endif
-
-} // namespace
+} // namespace WebCore
index af86168..f2ab61e 100644 (file)
 
 namespace WebCore {
 
-#if USE(CFNETWORK)
-
-CFCachedURLResponseRef ResourceLoader::willCacheResponse(ResourceHandle*, CFCachedURLResponseRef cachedResponse)
-{
-    if (m_options.sendLoadCallbacks == DoNotSendCallbacks)
-        return nullptr;
-
-    RetainPtr<NSCachedURLResponse> nsCachedResponse = adoptNS([[NSCachedURLResponse alloc] _initWithCFCachedURLResponse:cachedResponse]);
-    return [frameLoader()->client().willCacheResponse(documentLoader(), identifier(), nsCachedResponse.get()) _CFCachedURLResponse];
-}
-
-#else
-
 NSCachedURLResponse* ResourceLoader::willCacheResponse(ResourceHandle*, NSCachedURLResponse* response)
 {
     if (m_options.sendLoadCallbacks == DoNotSendCallbacks)
@@ -56,8 +43,6 @@ NSCachedURLResponse* ResourceLoader::willCacheResponse(ResourceHandle*, NSCached
     return frameLoader()->client().willCacheResponse(documentLoader(), identifier(), response);
 }
 
-#endif
-
 #if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
 
 void ResourceLoader::didReceiveDataArray(CFArrayRef dataArray)
index aa49d9f..87b8b14 100644 (file)
@@ -45,11 +45,7 @@ namespace WebCore {
 void Page::platformInitialize()
 {
 #if PLATFORM(IOS)
-#if USE(CFNETWORK)
-    addSchedulePair(SchedulePair::create(WebThreadRunLoop(), kCFRunLoopCommonModes));
-#else
     addSchedulePair(SchedulePair::create(WebThreadNSRunLoop(), kCFRunLoopCommonModes));
-#endif // USE(CFNETWORK)
 #else
     addSchedulePair(SchedulePair::create([NSRunLoop currentRunLoop], kCFRunLoopCommonModes));
 #endif
@@ -69,14 +65,12 @@ void Page::addSchedulePair(Ref<SchedulePair>&& pair)
         m_scheduledRunLoopPairs = std::make_unique<SchedulePairHashSet>();
     m_scheduledRunLoopPairs->add(pair.ptr());
 
-#if !USE(CFNETWORK)
     for (Frame* frame = &m_mainFrame.get(); frame; frame = frame->tree().traverseNext()) {
         if (DocumentLoader* documentLoader = frame->loader().documentLoader())
             documentLoader->schedule(pair);
         if (DocumentLoader* documentLoader = frame->loader().provisionalDocumentLoader())
             documentLoader->schedule(pair);
     }
-#endif
 
     // FIXME: make SharedTimerMac use these SchedulePairs.
 }
@@ -89,14 +83,12 @@ void Page::removeSchedulePair(Ref<SchedulePair>&& pair)
 
     m_scheduledRunLoopPairs->remove(pair.ptr());
 
-#if !USE(CFNETWORK)
     for (Frame* frame = &m_mainFrame.get(); frame; frame = frame->tree().traverseNext()) {
         if (DocumentLoader* documentLoader = frame->loader().documentLoader())
             documentLoader->unschedule(pair);
         if (DocumentLoader* documentLoader = frame->loader().provisionalDocumentLoader())
             documentLoader->unschedule(pair);
     }
-#endif
 }
 
 } // namespace
index 98dede7..e2fdc94 100644 (file)
 #import <VideoToolbox/VideoToolbox.h>
 #endif
 
-#if USE(CFNETWORK)
-#include "CFNSURLConnectionSPI.h"
-#endif
-
 #import "CoreVideoSoftLink.h"
 
 namespace std {
@@ -372,58 +368,6 @@ static dispatch_queue_t globalPullDelegateQueue()
 }
 #endif
 
-#if USE(CFNETWORK)
-class WebCoreNSURLAuthenticationChallengeClient : public RefCounted<WebCoreNSURLAuthenticationChallengeClient>, public AuthenticationClient {
-public:
-    static RefPtr<WebCoreNSURLAuthenticationChallengeClient> create(NSURLAuthenticationChallenge *challenge)
-    {
-        return adoptRef(new WebCoreNSURLAuthenticationChallengeClient(challenge));
-    }
-
-    using RefCounted<WebCoreNSURLAuthenticationChallengeClient>::ref;
-    using RefCounted<WebCoreNSURLAuthenticationChallengeClient>::deref;
-
-private:
-    WebCoreNSURLAuthenticationChallengeClient(NSURLAuthenticationChallenge *challenge)
-        : m_challenge(challenge)
-    {
-        ASSERT(m_challenge);
-    }
-
-    void refAuthenticationClient() override { ref(); }
-    void derefAuthenticationClient() override { deref(); }
-
-    void receivedCredential(const AuthenticationChallenge&, const Credential& credential) override
-    {
-        [[m_challenge sender] useCredential:credential.nsCredential() forAuthenticationChallenge:m_challenge.get()];
-    }
-
-    void receivedRequestToContinueWithoutCredential(const AuthenticationChallenge&) override
-    {
-        [[m_challenge sender] continueWithoutCredentialForAuthenticationChallenge:m_challenge.get()];
-    }
-
-    void receivedCancellation(const AuthenticationChallenge&) override
-    {
-        [[m_challenge sender] cancelAuthenticationChallenge:m_challenge.get()];
-    }
-
-    void receivedRequestToPerformDefaultHandling(const AuthenticationChallenge&) override
-    {
-        if ([[m_challenge sender] respondsToSelector:@selector(performDefaultHandlingForAuthenticationChallenge:)])
-            [[m_challenge sender] performDefaultHandlingForAuthenticationChallenge:m_challenge.get()];
-    }
-
-    void receivedChallengeRejection(const AuthenticationChallenge&) override
-    {
-        if ([[m_challenge sender] respondsToSelector:@selector(rejectProtectionSpaceAndContinueWithChallenge:)])
-            [[m_challenge sender] rejectProtectionSpaceAndContinueWithChallenge:m_challenge.get()];
-    }
-
-    RetainPtr<NSURLAuthenticationChallenge> m_challenge;
-};
-#endif
-
 void MediaPlayerPrivateAVFoundationObjC::registerMediaEngine(MediaEngineRegistrar registrar)
 {
     if (!isAvailable())
@@ -1797,15 +1741,7 @@ bool MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource(AVAssetR
 
 bool MediaPlayerPrivateAVFoundationObjC::shouldWaitForResponseToAuthenticationChallenge(NSURLAuthenticationChallenge* nsChallenge)
 {
-#if USE(CFNETWORK)
-    RefPtr<WebCoreNSURLAuthenticationChallengeClient> client = WebCoreNSURLAuthenticationChallengeClient::create(nsChallenge);
-    RetainPtr<CFURLAuthChallengeRef> cfChallenge = adoptCF([nsChallenge _createCFAuthChallenge]);
-    AuthenticationChallenge challenge(cfChallenge.get(), client.get());
-#else
-    AuthenticationChallenge challenge(nsChallenge);
-#endif
-
-    return player()->shouldWaitForResponseToAuthenticationChallenge(challenge);
+    return player()->shouldWaitForResponseToAuthenticationChallenge(AuthenticationChallenge(nsChallenge));
 }
 
 void MediaPlayerPrivateAVFoundationObjC::didCancelLoadingRequest(AVAssetResourceLoadingRequest* avRequest)
index bafc1d5..5254fd3 100644 (file)
@@ -77,14 +77,6 @@ typedef struct _NSRect NSRect;
 #include <CoreGraphics/CoreGraphics.h>
 #endif
 
-#if USE(CFNETWORK)
-typedef struct OpaqueCFHTTPCookieStorage*  CFHTTPCookieStorageRef;
-typedef struct _CFURLProtectionSpace* CFURLProtectionSpaceRef;
-typedef struct _CFURLCredential* WKCFURLCredentialRef;
-typedef struct _CFURLRequest* CFMutableURLRequestRef;
-typedef const struct _CFURLRequest* CFURLRequestRef;
-#endif
-
 OBJC_CLASS AVAsset;
 OBJC_CLASS AVPlayer;
 OBJC_CLASS CALayer;
index 2a4a7ad..cf1f571 100644 (file)
@@ -29,7 +29,7 @@
 #include "SessionID.h"
 #include <wtf/text/WTFString.h>
 
-#if PLATFORM(COCOA) || USE(CFNETWORK)
+#if PLATFORM(COCOA) || USE(CFURLCONNECTION)
 #include "CFNetworkSPI.h"
 #include <wtf/RetainPtr.h>
 #endif
@@ -59,7 +59,7 @@ public:
     SessionID sessionID() const { return m_sessionID; }
     CredentialStorage& credentialStorage() { return m_credentialStorage; }
 
-#if PLATFORM(COCOA) || USE(CFNETWORK)
+#if PLATFORM(COCOA) || USE(CFURLCONNECTION)
     NetworkStorageSession(SessionID, RetainPtr<CFURLStorageSessionRef>);
 
     // May be null, in which case a Foundation default should be used.
@@ -84,7 +84,7 @@ private:
     static HashMap<SessionID, std::unique_ptr<NetworkStorageSession>>& globalSessionMap();
     SessionID m_sessionID;
 
-#if PLATFORM(COCOA) || USE(CFNETWORK)
+#if PLATFORM(COCOA) || USE(CFURLCONNECTION)
     RetainPtr<CFURLStorageSessionRef> m_platformSession;
 #elif USE(SOUP)
     std::unique_ptr<SoupNetworkSession> m_session;
index c3862ff..769de80 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef ProtectionSpace_h
-#define ProtectionSpace_h
+#pragma once
 
 #if PLATFORM(COCOA)
 #include "ProtectionSpaceCocoa.h"
-#elif USE(CFNETWORK)
+#elif USE(CFURLCONNECTION)
 #include "ProtectionSpaceCFNet.h"
 #else
 
@@ -50,5 +49,3 @@ public:
 } // namespace WebCore
 
 #endif
-
-#endif // ProtectionSpace_h
index e88ed03..e436efd 100644 (file)
 
 #include "ProtectionSpace.h"
 
-#if USE(CFNETWORK) && !PLATFORM(COCOA)
-#include "AuthenticationCF.h"
-#include <CFNetwork/CFURLProtectionSpacePriv.h>
-#endif
-
 namespace WebCore {
 
 // Need to enforce empty, non-null strings due to the pickiness of the String == String operator
index b6c67b7..69553ff 100644 (file)
@@ -154,7 +154,7 @@ void ResourceHandle::clearClient()
     d->m_client = nullptr;
 }
 
-#if !PLATFORM(COCOA) && !USE(CFNETWORK) && !USE(SOUP)
+#if !PLATFORM(COCOA) && !USE(CFURLCONNECTION) && !USE(SOUP)
 // ResourceHandle never uses async client calls on these platforms yet.
 void ResourceHandle::continueWillSendRequest(ResourceRequest&&)
 {
index da6b051..f357b24 100644 (file)
@@ -31,7 +31,7 @@
 #include "ResourceLoadPriority.h"
 #include <wtf/RefCounted.h>
 
-#if PLATFORM(COCOA) || USE(CFNETWORK)
+#if PLATFORM(COCOA) || USE(CFURLCONNECTION)
 #include <wtf/RetainPtr.h>
 #endif
 
@@ -60,14 +60,14 @@ typedef struct objc_object *id;
 #endif
 #endif
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 typedef const struct _CFCachedURLResponse* CFCachedURLResponseRef;
 typedef struct _CFURLConnection* CFURLConnectionRef;
 typedef int CFHTTPCookieStorageAcceptPolicy;
 typedef struct OpaqueCFHTTPCookieStorage* CFHTTPCookieStorageRef;
 #endif
 
-#if PLATFORM(COCOA) || USE(CFNETWORK)
+#if PLATFORM(COCOA) || USE(CFURLCONNECTION)
 typedef const struct __CFURLStorageSession* CFURLStorageSessionRef;
 #endif
 
@@ -92,22 +92,17 @@ class ResourceResponse;
 class SharedBuffer;
 class Timer;
 
-class ResourceHandle : public RefCounted<ResourceHandle>
-#if PLATFORM(COCOA) || USE(CFNETWORK) || USE(CURL) || USE(SOUP)
-    , public AuthenticationClient
-#endif
-    {
+class ResourceHandle : public RefCounted<ResourceHandle>, public AuthenticationClient {
 public:
     WEBCORE_EXPORT static RefPtr<ResourceHandle> create(NetworkingContext*, const ResourceRequest&, ResourceHandleClient*, bool defersLoading, bool shouldContentSniff);
     WEBCORE_EXPORT static void loadResourceSynchronously(NetworkingContext*, const ResourceRequest&, StoredCredentials, ResourceError&, ResourceResponse&, Vector<char>& data);
 
     WEBCORE_EXPORT virtual ~ResourceHandle();
 
-#if PLATFORM(COCOA) || USE(CFNETWORK)
+#if PLATFORM(COCOA) || USE(CFURLCONNECTION)
     ResourceRequest willSendRequest(ResourceRequest&&, ResourceResponse&&);
 #endif
 
-#if PLATFORM(COCOA) || USE(CFNETWORK) || USE(CURL) || USE(SOUP)
     bool shouldUseCredentialStorage();
     void didReceiveAuthenticationChallenge(const AuthenticationChallenge&);
     void receivedCredential(const AuthenticationChallenge&, const Credential&) override;
@@ -115,9 +110,8 @@ public:
     void receivedCancellation(const AuthenticationChallenge&) override;
     void receivedRequestToPerformDefaultHandling(const AuthenticationChallenge&) override;
     void receivedChallengeRejection(const AuthenticationChallenge&) override;
-#endif
 
-#if PLATFORM(COCOA) || USE(CFNETWORK)
+#if PLATFORM(COCOA) || USE(CFURLCONNECTION)
     bool tryHandlePasswordBasedAuthentication(const AuthenticationChallenge&);
 #endif
 
@@ -125,7 +119,7 @@ public:
     bool canAuthenticateAgainstProtectionSpace(const ProtectionSpace&);
 #endif
 
-#if PLATFORM(COCOA) && !USE(CFNETWORK)
+#if PLATFORM(COCOA)
     WEBCORE_EXPORT NSURLConnection *connection() const;
     id makeDelegate(bool);
     id delegate();
@@ -133,19 +127,15 @@ public:
 #endif
         
 #if PLATFORM(COCOA) && ENABLE(WEB_TIMING)
-#if USE(CFNETWORK)
-    static void getConnectionTimingData(CFURLConnectionRef, NetworkLoadTiming&);
-#else
     static void getConnectionTimingData(NSURLConnection *, NetworkLoadTiming&);
 #endif
-#endif
         
 #if PLATFORM(COCOA)
     void schedule(WTF::SchedulePair&);
     void unschedule(WTF::SchedulePair&);
 #endif
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
     CFURLStorageSessionRef storageSession() const;
     CFURLConnectionRef connection() const;
     WEBCORE_EXPORT RetainPtr<CFURLConnectionRef> releaseConnectionForDownload();
@@ -208,10 +198,10 @@ public:
 #endif
 
     // Called in response to ResourceHandleClient::willCacheResponseAsync().
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
     WEBCORE_EXPORT void continueWillCacheResponse(CFCachedURLResponseRef);
 #endif
-#if PLATFORM(COCOA) && !USE(CFNETWORK)
+#if PLATFORM(COCOA)
     WEBCORE_EXPORT void continueWillCacheResponse(NSCachedURLResponse *);
 #endif
 
@@ -227,14 +217,10 @@ public:
     using RefCounted<ResourceHandle>::ref;
     using RefCounted<ResourceHandle>::deref;
 
-#if PLATFORM(COCOA) || USE(CFNETWORK)
+#if PLATFORM(COCOA) || USE(CFURLCONNECTION)
     WEBCORE_EXPORT static CFStringRef synchronousLoadRunLoopMode();
 #endif
 
-#if PLATFORM(IOS) && USE(CFNETWORK)
-    static CFMutableDictionaryRef createSSLPropertiesFromNSURLRequest(const ResourceRequest&);
-#endif
-
     typedef Ref<ResourceHandle> (*BuiltinConstructor)(const ResourceRequest& request, ResourceHandleClient* client);
     static void registerBuiltinConstructor(const AtomicString& protocol, BuiltinConstructor);
 
@@ -263,19 +249,19 @@ private:
     void refAuthenticationClient() override { ref(); }
     void derefAuthenticationClient() override { deref(); }
 
-#if PLATFORM(COCOA) || USE(CFNETWORK)
+#if PLATFORM(COCOA) || USE(CFURLCONNECTION)
     enum class SchedulingBehavior { Asynchronous, Synchronous };
 #endif
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
     void createCFURLConnection(bool shouldUseCredentialStorage, bool shouldContentSniff, SchedulingBehavior, CFDictionaryRef clientProperties);
 #endif
 
-#if PLATFORM(MAC) && !USE(CFNETWORK)
+#if PLATFORM(MAC)
     void createNSURLConnection(id delegate, bool shouldUseCredentialStorage, bool shouldContentSniff, SchedulingBehavior);
 #endif
 
-#if PLATFORM(IOS) && !USE(CFNETWORK)
+#if PLATFORM(IOS)
     void createNSURLConnection(id delegate, bool shouldUseCredentialStorage, bool shouldContentSniff, SchedulingBehavior, NSDictionary *connectionProperties);
 #endif
 
index f7357bf..9487d96 100644 (file)
@@ -62,7 +62,7 @@ void ResourceHandleClient::canAuthenticateAgainstProtectionSpaceAsync(ResourceHa
 }
 #endif
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 void ResourceHandleClient::willCacheResponseAsync(ResourceHandle* handle, CFCachedURLResponseRef response)
 {
     handle->continueWillCacheResponse(response);
index 126f9be..1a3a4d5 100644 (file)
 #include "PlatformExportMacros.h"
 #include <wtf/Ref.h>
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 #include <CFNetwork/CFURLCachePriv.h>
 #include <CFNetwork/CFURLResponsePriv.h>
 #endif
 
-#if PLATFORM(IOS) || USE(CFNETWORK)
+#if PLATFORM(IOS) || USE(CFURLCONNECTION)
 #include <wtf/RetainPtr.h>
 #endif
 
@@ -96,7 +96,7 @@ namespace WebCore {
         WEBCORE_EXPORT virtual void canAuthenticateAgainstProtectionSpaceAsync(ResourceHandle*, const ProtectionSpace&);
 #endif
         // Client will pass an updated request using ResourceHandle::continueWillCacheResponse() when ready.
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
         WEBCORE_EXPORT virtual void willCacheResponseAsync(ResourceHandle*, CFCachedURLResponseRef);
 #elif PLATFORM(COCOA)
         WEBCORE_EXPORT virtual void willCacheResponseAsync(ResourceHandle*, NSCachedURLResponse *);
@@ -118,16 +118,13 @@ namespace WebCore {
 #endif
         virtual void receivedCancellation(ResourceHandle*, const AuthenticationChallenge&) { }
 
-#if PLATFORM(IOS) || USE(CFNETWORK)
+#if PLATFORM(IOS) || USE(CFURLCONNECTION)
         virtual RetainPtr<CFDictionaryRef> connectionProperties(ResourceHandle*) { return nullptr; }
 #endif
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
         virtual CFCachedURLResponseRef willCacheResponse(ResourceHandle*, CFCachedURLResponseRef response) { return response; }
-#if PLATFORM(WIN)
         virtual bool shouldCacheResponse(ResourceHandle*, CFCachedURLResponseRef) { return true; }
-#endif // PLATFORM(WIN)
-
 #elif PLATFORM(COCOA)
         virtual NSCachedURLResponse *willCacheResponse(ResourceHandle*, NSCachedURLResponse *response) { return response; }
 #endif
index cdcc139..2d8a810 100644 (file)
@@ -33,7 +33,7 @@
 #include "AuthenticationChallenge.h"
 #include "Timer.h"
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 #include "ResourceHandleCFURLConnectionDelegate.h"
 #include <CFNetwork/CFURLConnectionPriv.h>
 #endif
@@ -61,7 +61,7 @@ OBJC_CLASS NSURLAuthenticationChallenge;
 OBJC_CLASS NSURLConnection;
 #endif
 
-#if PLATFORM(COCOA) || USE(CFNETWORK)
+#if PLATFORM(COCOA) || USE(CFURLCONNECTION)
 typedef const struct __CFURLStorageSession* CFURLStorageSessionRef;
 #endif
 
@@ -83,7 +83,7 @@ namespace WebCore {
             , m_defersLoading(defersLoading)
             , m_shouldContentSniff(shouldContentSniff)
             , m_usesAsyncCallbacks(client && client->usesAsyncCallbacks())
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
             , m_currentRequest(request)
 #endif
 #if USE(CURL)
@@ -131,19 +131,19 @@ namespace WebCore {
         bool m_defersLoading;
         bool m_shouldContentSniff;
         bool m_usesAsyncCallbacks;
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
         RetainPtr<CFURLConnectionRef> m_connection;
         ResourceRequest m_currentRequest;
         RefPtr<ResourceHandleCFURLConnectionDelegate> m_connectionDelegate;
 #endif
-#if PLATFORM(COCOA) && !USE(CFNETWORK)
+#if PLATFORM(COCOA)
         RetainPtr<NSURLConnection> m_connection;
         RetainPtr<id> m_delegate;
 #endif
 #if PLATFORM(COCOA)
         bool m_startWhenScheduled;
 #endif
-#if PLATFORM(COCOA) || USE(CFNETWORK)
+#if PLATFORM(COCOA) || USE(CFURLCONNECTION)
         RetainPtr<CFURLStorageSessionRef> m_storageSession;
 #endif
 #if USE(CURL)
index f223bfe..80914f1 100644 (file)
@@ -32,7 +32,7 @@
 
 namespace WebCore {
 
-#if !USE(SOUP) && (!PLATFORM(COCOA) || USE(CFNETWORK))
+#if !USE(SOUP) && !PLATFORM(COCOA)
 double ResourceRequestBase::s_defaultTimeoutInterval = INT_MAX;
 #else
 // Will use NSURLRequest default timeout unless set to a non-zero value with setDefaultTimeoutInterval().
@@ -618,7 +618,7 @@ void ResourceRequestBase::updateResourceRequest(HTTPBodyUpdatePolicy bodyPolicy)
     }
 }
 
-#if !PLATFORM(COCOA) && !USE(CFNETWORK) && !USE(SOUP)
+#if !PLATFORM(COCOA) && !USE(CFURLCONNECTION) && !USE(SOUP)
 unsigned initializeMaximumHTTPConnectionCountPerHost()
 {
     // This is used by the loader to control the number of issued parallel load requests. 
index 7883e46..d7cb475 100644 (file)
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "AuthenticationCF.h"
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 
 #include "AuthenticationChallenge.h"
 #include "AuthenticationClient.h"
@@ -51,18 +51,8 @@ AuthenticationChallenge::AuthenticationChallenge(const ProtectionSpace& protecti
 {
 }
 
-AuthenticationChallenge::AuthenticationChallenge(CFURLAuthChallengeRef cfChallenge,
-                                                 AuthenticationClient* authenticationClient)
-#if PLATFORM(COCOA)
-    : AuthenticationChallengeBase(ProtectionSpace(CFURLAuthChallengeGetProtectionSpace(cfChallenge)),
-                                  Credential(CFURLAuthChallengeGetProposedCredential(cfChallenge)),
-#else
-    : AuthenticationChallengeBase(core(CFURLAuthChallengeGetProtectionSpace(cfChallenge)),
-                                  core(CFURLAuthChallengeGetProposedCredential(cfChallenge)),
-#endif
-                                  CFURLAuthChallengeGetPreviousFailureCount(cfChallenge),
-                                  (CFURLResponseRef)CFURLAuthChallengeGetFailureResponse(cfChallenge),
-                                  CFURLAuthChallengeGetError(cfChallenge))
+AuthenticationChallenge::AuthenticationChallenge(CFURLAuthChallengeRef cfChallenge, AuthenticationClient* authenticationClient)
+    : AuthenticationChallengeBase(core(CFURLAuthChallengeGetProtectionSpace(cfChallenge)), core(CFURLAuthChallengeGetProposedCredential(cfChallenge)), CFURLAuthChallengeGetPreviousFailureCount(cfChallenge), (CFURLResponseRef)CFURLAuthChallengeGetFailureResponse(cfChallenge), CFURLAuthChallengeGetError(cfChallenge))
     , m_authenticationClient(authenticationClient)
     , m_cfChallenge(cfChallenge)
 {
@@ -93,22 +83,12 @@ CFURLAuthChallengeRef createCF(const AuthenticationChallenge& coreChallenge)
 {
     // FIXME: Why not cache CFURLAuthChallengeRef in m_cfChallenge? Foundation counterpart does that.
 
-#if PLATFORM(COCOA)
-    CFURLAuthChallengeRef result = CFURLAuthChallengeCreate(0, coreChallenge.protectionSpace().cfSpace(), coreChallenge.proposedCredential().cfCredential(),
-#else
     RetainPtr<CFURLCredentialRef> credential = adoptCF(createCF(coreChallenge.proposedCredential()));
     RetainPtr<CFURLProtectionSpaceRef> protectionSpace = adoptCF(createCF(coreChallenge.protectionSpace()));
 
-    CFURLAuthChallengeRef result = CFURLAuthChallengeCreate(0, protectionSpace.get(), credential.get(),
-#endif
-                                        coreChallenge.previousFailureCount(),
-                                        coreChallenge.failureResponse().cfURLResponse(),
-                                        coreChallenge.error());
-    return result;
+    return CFURLAuthChallengeCreate(nullptr, protectionSpace.get(), credential.get(), coreChallenge.previousFailureCount(), coreChallenge.failureResponse().cfURLResponse(), coreChallenge.error());
 }
 
-#if PLATFORM(WIN)
-
 CFURLCredentialRef createCF(const Credential& coreCredential)
 {
     CFURLCredentialPersistence persistence = kCFURLCredentialPersistenceNone;
@@ -290,8 +270,7 @@ ProtectionSpace core(CFURLProtectionSpaceRef cfSpace)
                            CFURLProtectionSpaceGetRealm(cfSpace),
                            scheme);
 }
-#endif // PLATFORM(WIN)
 
 };
 
-#endif // USE(CFNETWORK)
+#endif // USE(CFURLCONNECTION)
index afff184..89a9352 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef AuthenticationCF_h
-#define AuthenticationCF_h
+#pragma once
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 
 #include <CFNetwork/CFURLCredentialPriv.h>
 
@@ -40,20 +39,10 @@ class Credential;
 class ProtectionSpace;
 
 CFURLAuthChallengeRef createCF(const AuthenticationChallenge&);
-#if PLATFORM(WIN)
 CFURLCredentialRef createCF(const Credential&);
 CFURLProtectionSpaceRef createCF(const ProtectionSpace&);
-#endif
-
-#if PLATFORM(COCOA)
-AuthenticationChallenge core(CFURLAuthChallengeRef);
-#endif
-#if PLATFORM(WIN)
 Credential core(CFURLCredentialRef);
 ProtectionSpace core(CFURLProtectionSpaceRef);
-#endif
 }
 
-#endif // USE(CFNETWORK)
-
-#endif // AuthenticationCF_h
+#endif // USE(CFURLCONNECTION)
index 35af116..157b852 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef AuthenticationChallenge_h
-#define AuthenticationChallenge_h
+#pragma once
 
 #include "AuthenticationChallengeBase.h"
 #include "AuthenticationClient.h"
 #include <wtf/RefPtr.h>
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 
 typedef struct _CFURLAuthChallenge* CFURLAuthChallengeRef;
 
@@ -50,7 +49,7 @@ class AuthenticationChallenge : public AuthenticationChallengeBase {
 public:
     AuthenticationChallenge() {}
     WEBCORE_EXPORT AuthenticationChallenge(const ProtectionSpace&, const Credential& proposedCredential, unsigned previousFailureCount, const ResourceResponse&, const ResourceError&);
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
     AuthenticationChallenge(CFURLAuthChallengeRef, AuthenticationClient*);
 
     CFURLAuthChallengeRef cfURLAuthChallengeRef() const { return m_cfChallenge.get(); }
@@ -69,7 +68,7 @@ private:
     static bool platformCompare(const AuthenticationChallenge& a, const AuthenticationChallenge& b);
 
     // Platform challenge may be null. If it's non-null, it's always up to date with other fields.
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
     RefPtr<AuthenticationClient> m_authenticationClient;
     RetainPtr<CFURLAuthChallengeRef> m_cfChallenge;
 #else
@@ -79,5 +78,3 @@ private:
 };
 
 }
-
-#endif
index 929186b..563055d 100644 (file)
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "PlatformCookieJar.h"
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 
 #include "CFNetworkSPI.h"
 #include "Cookie.h"
@@ -255,4 +255,4 @@ void deleteAllCookiesModifiedSince(const NetworkStorageSession&, std::chrono::sy
 
 } // namespace WebCore
 
-#endif // USE(CFNETWORK)
+#endif // USE(CFURLCONNECTION)
index 59fea53..7cf48fd 100644 (file)
 #include "config.h"
 #include "CredentialStorage.h"
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 
 #include "AuthenticationCF.h"
 #include "CFNetworkSPI.h"
 #include "Credential.h"
 #include "ProtectionSpace.h"
-#include <wtf/RetainPtr.h>
-
-#if PLATFORM(COCOA)
-#include "WebCoreSystemInterface.h"
-#elif PLATFORM(WIN)
 #include <WebKitSystemInterface/WebKitSystemInterface.h>
-#endif
-
-#if PLATFORM(IOS)
-#include <CFNetwork/CFURLCredentialStorage.h>
-#endif
+#include <wtf/RetainPtr.h>
 
 namespace WebCore {
     
@@ -54,29 +45,11 @@ static inline CFURLCredentialRef copyCredentialFromProtectionSpace(CFURLProtecti
 
 Credential CredentialStorage::getFromPersistentStorage(const ProtectionSpace& protectionSpace)
 {
-#if PLATFORM(COCOA)
-    auto credentialCF = adoptCF(copyCredentialFromProtectionSpace(protectionSpace.cfSpace()));
-    return Credential(credentialCF.get());
-#else
     auto protectionSpaceCF = adoptCF(createCF(protectionSpace));
     auto credentialCF = adoptCF(copyCredentialFromProtectionSpace(protectionSpaceCF.get()));
     return core(credentialCF.get());
-#endif
-}
-
-#if PLATFORM(IOS)
-void CredentialStorage::saveToPersistentStorage(const ProtectionSpace& protectionSpace, const Credential& credential)
-{
-    RetainPtr<CFURLCredentialStorageRef> storageCF = adoptCF(CFURLCredentialStorageCreate(0));
-
-    if (credential.persistence() == CredentialPersistenceNone) {
-        Credential sessionCredential(credential, CredentialPersistenceForSession);
-        CFURLCredentialStorageSetDefaultCredentialForProtectionSpace(storageCF.get(), sessionCredential.cfCredential(), protectionSpace.cfSpace());
-    } else
-        CFURLCredentialStorageSetDefaultCredentialForProtectionSpace(storageCF.get(), credential.cfCredential(), protectionSpace.cfSpace());
 }
-#endif
 
 } // namespace WebCore
 
-#endif // USE(CFNETWORK)
+#endif // USE(CFURLCONNECTION)
index 126ef0a..46b8994 100644 (file)
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "LoaderRunLoopCF.h"
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 
 #include <CoreFoundation/CoreFoundation.h>
 #include <limits>
@@ -87,4 +87,4 @@ CFRunLoopRef loaderRunLoop()
 
 } // namespace WebCore
 
-#endif // USE(CFNETWORK)
+#endif // USE(CFURLCONNECTION)
index 67de56a..c583078 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef LoaderRunLoopCF_h
-#define LoaderRunLoopCF_h
+#pragma once
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 
 typedef struct __CFRunLoop* CFRunLoopRef;
 
@@ -36,6 +35,4 @@ CFRunLoopRef loaderRunLoop();
 
 }
 
-#endif // USE(CFNETWORK)
-
-#endif // LoaderRunLoop_h
+#endif // USE(CFURLCONNECTION)
index 9a11d26..2117db5 100644 (file)
@@ -38,6 +38,8 @@
 #include <WebKitSystemInterface/WebKitSystemInterface.h>
 #endif
 
+// FIXME: This file is mostly Cocoa code, not CFNetwork code. This code should be moved.
+
 namespace WebCore {
 
 static bool cookieStoragePartitioningEnabled;
@@ -93,11 +95,11 @@ RetainPtr<CFHTTPCookieStorageRef> NetworkStorageSession::cookieStorage() const
     if (m_platformSession)
         return adoptCF(_CFURLStorageSessionCopyCookieStorage(kCFAllocatorDefault, m_platformSession.get()));
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
     return _CFHTTPCookieStorageGetDefault(kCFAllocatorDefault);
 #else
     // When using NSURLConnection, we also use its shared cookie storage.
-    return 0;
+    return nullptr;
 #endif
 }
 
index 1a4898c..cb08b93 100644 (file)
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "ProtectionSpaceCFNet.h"
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 
 #include "AuthenticationCF.h"
 #include <CFNetwork/CFURLProtectionSpacePriv.h>
@@ -42,4 +42,4 @@ bool ProtectionSpace::receivesCredentialSecurely() const
 
 } // namespace WebCore
 
-#endif // USE(CFNETWORK)
+#endif // USE(CFURLCONNECTION)
index acaad5a..f0a19d3 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef ProtectionSpaceCFNet_h
-#define ProtectionSpaceCFNet_h
+#pragma once
 
-#if !PLATFORM(WIN) || !USE(CFNETWORK)
-#error This header should only be included when targeting Windows and using CFNetwork.
+#if !PLATFORM(WIN) || !USE(CFURLCONNECTION)
+#error This header should only be included when targeting Windows and using CFURLConnection.
 #endif
 
 #include "ProtectionSpaceBase.h"
@@ -48,5 +47,3 @@ public:
 };
 
 } // namespace WebCore
-
-#endif // ProtectionSpaceCFNet_h
index e4e0b77..8d2f6a4 100644 (file)
 #include "ResourceErrorBase.h"
 
 #include <wtf/RetainPtr.h>
-#if USE(CFNETWORK)
+
+#if PLATFORM(WIN)
+#if USE(CFURLCONNECTION)
 #include <CoreFoundation/CFStream.h>
 #endif
-#if PLATFORM(WIN)
 #include <windows.h>
 #include <wincrypt.h> // windows.h must be included before wincrypt.h.
 #endif
@@ -61,12 +62,10 @@ public:
     WEBCORE_EXPORT CFErrorRef cfError() const;
     WEBCORE_EXPORT operator CFErrorRef() const;
 
-#if USE(CFNETWORK)
-#if PLATFORM(WIN)
+#if USE(CFURLCONNECTION)
     ResourceError(const String& domain, int errorCode, const URL& failingURL, const String& localizedDescription, CFDataRef certificate);
     PCCERT_CONTEXT certificate() const;
     void setCertificate(CFDataRef);
-#endif
     ResourceError(CFStreamError error);
     CFStreamError cfStreamError() const;
     operator CFStreamError() const;
@@ -88,14 +87,13 @@ private:
     void doPlatformIsolatedCopy(const ResourceError&);
 
     bool m_dataIsUpToDate;
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
     mutable RetainPtr<CFErrorRef> m_platformError;
-#if PLATFORM(COCOA)
+#elif PLATFORM(COCOA)
     mutable RetainPtr<NSError> m_platformNSError;
 #endif
 #if PLATFORM(WIN)
     RetainPtr<CFDataRef> m_certificate;
-#endif
 #else
     mutable RetainPtr<NSError> m_platformError;
 #endif
index 5037680..33c360c 100644 (file)
 #include "config.h"
 #include "ResourceError.h"
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 
 #include "URL.h"
 #include <CoreFoundation/CFError.h>
 #include <CFNetwork/CFNetworkErrors.h>
-#include <wtf/RetainPtr.h>
-
-#if PLATFORM(WIN)
 #include <WebKitSystemInterface/WebKitSystemInterface.h>
-#endif
+#include <wtf/RetainPtr.h>
 
 namespace WebCore {
 
@@ -218,4 +215,4 @@ ResourceError::operator CFStreamError() const
 
 } // namespace WebCore
 
-#endif // USE(CFNETWORK)
+#endif // USE(CFURLCONNECTION)
index 8ddf634..ea8b442 100644 (file)
@@ -46,6 +46,8 @@
 #include "SynchronousLoaderClient.h"
 #include "SynchronousResourceHandleCFURLConnectionDelegate.h"
 #include <CFNetwork/CFNetwork.h>
+#include <WebKitSystemInterface/WebKitSystemInterface.h>
+#include <process.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <wtf/HashMap.h>
 #include <wtf/text/Base64.h>
 #include <wtf/text/CString.h>
 
-#if PLATFORM(COCOA)
-#include "ResourceHandleCFURLConnectionDelegateWithOperationQueue.h"
-#include "WebCoreSystemInterface.h"
-#if USE(CFNETWORK)
-#include "WebCoreURLResponse.h"
-#include <CFNetwork/CFURLConnectionPriv.h>
-#include <CFNetwork/CFURLRequestPriv.h>
-#endif
-#endif
-
-#if PLATFORM(WIN)
-#include <WebKitSystemInterface/WebKitSystemInterface.h>
-#include <process.h>
-
 // FIXME: Remove this declaration once it's in WebKitSupportLibrary.
 extern "C" {
 __declspec(dllimport) CFURLConnectionRef CFURLConnectionCreateWithProperties(
@@ -77,11 +65,10 @@ __declspec(dllimport) CFURLConnectionRef CFURLConnectionCreateWithProperties(
   CFURLConnectionClient *  client,
   CFDictionaryRef properties);
 }
-#endif
 
 namespace WebCore {
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 
 static HashSet<String, ASCIICaseInsensitiveHash>& allowsAnyHTTPSCertificateHosts()
 {
@@ -120,11 +107,7 @@ ResourceHandle::~ResourceHandle()
     
 static inline CFStringRef shouldSniffConnectionProperty()
 {
-#if PLATFORM(WIN)
     return CFSTR("_kCFURLConnectionPropertyShouldSniff");
-#else
-    return _kCFURLConnectionPropertyShouldSniff;
-#endif
 }
 
 void ResourceHandle::createCFURLConnection(bool shouldUseCredentialStorage, bool shouldContentSniff, SchedulingBehavior schedulingBehavior, CFDictionaryRef clientProperties)
@@ -166,9 +149,6 @@ void ResourceHandle::createCFURLConnection(bool shouldUseCredentialStorage, bool
 
     RetainPtr<CFMutableDictionaryRef> sslProps;
 
-#if PLATFORM(IOS)
-    sslProps = adoptCF(ResourceHandle::createSSLPropertiesFromNSURLRequest(firstRequest()));
-#else
     if (allowsAnyHTTPSCertificateHosts().contains(firstRequest().url().host())) {
         sslProps = adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
         CFDictionaryAddValue(sslProps.get(), kCFStreamSSLAllowsAnyRoot, kCFBooleanTrue);
@@ -181,11 +161,8 @@ void ResourceHandle::createCFURLConnection(bool shouldUseCredentialStorage, bool
     if (clientCert != clientCertificates().end()) {
         if (!sslProps)
             sslProps = adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
-#if PLATFORM(WIN)
         wkSetClientCertificateInSSLProperties(sslProps.get(), (clientCert->value).get());
-#endif
     }
-#endif // PLATFORM(IOS)
 
     if (sslProps)
         CFURLRequestSetSSLProperties(request.get(), sslProps.get());
@@ -206,12 +183,6 @@ void ResourceHandle::createCFURLConnection(bool shouldUseCredentialStorage, bool
         CFDictionarySetValue(streamProperties, CFSTR("_WebKitSynchronousRequest"), kCFBooleanTrue);
     }
 
-#if PLATFORM(COCOA)
-    RetainPtr<CFDataRef> sourceApplicationAuditData = d->m_context->sourceApplicationAuditData();
-    if (sourceApplicationAuditData)
-        CFDictionarySetValue(streamProperties, CFSTR("kCFStreamPropertySourceApplication"), sourceApplicationAuditData.get());
-#endif
-
     static const CFStringRef kCFURLConnectionSocketStreamProperties = CFSTR("kCFURLConnectionSocketStreamProperties");
     RetainPtr<CFMutableDictionaryRef> propertiesDictionary;
     if (clientProperties)
@@ -230,14 +201,7 @@ void ResourceHandle::createCFURLConnection(bool shouldUseCredentialStorage, bool
     CFDictionaryAddValue(propertiesDictionary.get(), kCFURLConnectionSocketStreamProperties, streamProperties);
     CFRelease(streamProperties);
 
-#if PLATFORM(COCOA)
-    if (d->m_usesAsyncCallbacks)
-        d->m_connectionDelegate = adoptRef(new ResourceHandleCFURLConnectionDelegateWithOperationQueue(this));
-    else
-        d->m_connectionDelegate = adoptRef(new SynchronousResourceHandleCFURLConnectionDelegate(this));
-#else
     d->m_connectionDelegate = adoptRef(new SynchronousResourceHandleCFURLConnectionDelegate(this));
-#endif
     d->m_connectionDelegate->setupRequest(request.get());
 
     CFURLConnectionClient_V6 client = d->m_connectionDelegate->makeConnectionClient();
@@ -264,10 +228,6 @@ bool ResourceHandle::start()
 
     bool shouldUseCredentialStorage = !client() || client()->shouldUseCredentialStorage(this);
 
-#if ENABLE(WEB_TIMING) && PLATFORM(COCOA) && !HAVE(TIMINGDATAOPTIONS)
-    setCollectsTimingData();
-#endif
-
     SchedulingBehavior schedulingBehavior = client()->loadingSynchronousXHR() ? SchedulingBehavior::Synchronous : SchedulingBehavior::Asynchronous;
 
     createCFURLConnection(shouldUseCredentialStorage, d->m_shouldContentSniff, schedulingBehavior, client()->connectionProperties(this).get());
@@ -351,16 +311,6 @@ void ResourceHandle::didReceiveAuthenticationChallenge(const AuthenticationChall
     ASSERT(challenge.cfURLAuthChallengeRef());
     ASSERT(challenge.authenticationClient() == this); // Should be already set.
 
-#if !PLATFORM(WIN)
-    // Proxy authentication is handled by CFNetwork internally. We can get here if the user cancels
-    // CFNetwork authentication dialog, and we shouldn't ask the client to display another one in that case.
-    if (challenge.protectionSpace().isProxy()) {
-        // Cannot use receivedRequestToContinueWithoutCredential(), because current challenge is not yet set.
-        CFURLConnectionUseCredential(d->m_connection.get(), 0, challenge.cfURLAuthChallengeRef());
-        return;
-    }
-#endif
-
     if (tryHandlePasswordBasedAuthentication(challenge))
         return;
 
@@ -381,11 +331,7 @@ bool ResourceHandle::tryHandlePasswordBasedAuthentication(const AuthenticationCh
 
     if (!d->m_user.isNull() && !d->m_pass.isNull()) {
         RetainPtr<CFURLCredentialRef> cfCredential = adoptCF(CFURLCredentialCreate(kCFAllocatorDefault, d->m_user.createCFString().get(), d->m_pass.createCFString().get(), 0, kCFURLCredentialPersistenceNone));
-#if PLATFORM(COCOA)
-        Credential credential = Credential(cfCredential.get());
-#else
         Credential credential = core(cfCredential.get());
-#endif
         
         URL urlToStore;
         if (challenge.failureResponse().httpStatusCode() == 401)
@@ -415,12 +361,8 @@ bool ResourceHandle::tryHandlePasswordBasedAuthentication(const AuthenticationCh
                     // Store the credential back, possibly adding it as a default for this directory.
                     d->m_context->storageSession().credentialStorage().set(credential, challenge.protectionSpace(), challenge.failureResponse().url());
                 }
-#if PLATFORM(COCOA)
-                CFURLConnectionUseCredential(d->m_connection.get(), credential.cfCredential(), challenge.cfURLAuthChallengeRef());
-#else
                 RetainPtr<CFURLCredentialRef> cfCredential = adoptCF(createCF(credential));
                 CFURLConnectionUseCredential(d->m_connection.get(), cfCredential.get(), challenge.cfURLAuthChallengeRef());
-#endif
                 return true;
             }
         }
@@ -470,20 +412,12 @@ void ResourceHandle::receivedCredential(const AuthenticationChallenge& challenge
         d->m_context->storageSession().credentialStorage().set(webCredential, challenge.protectionSpace(), urlToStore);
 
         if (d->m_connection) {
-#if PLATFORM(COCOA)
-            CFURLConnectionUseCredential(d->m_connection.get(), webCredential.cfCredential(), challenge.cfURLAuthChallengeRef());
-#else
             RetainPtr<CFURLCredentialRef> cfCredential = adoptCF(createCF(webCredential));
             CFURLConnectionUseCredential(d->m_connection.get(), cfCredential.get(), challenge.cfURLAuthChallengeRef());
-#endif
         }
     } else if (d->m_connection) {
-#if PLATFORM(COCOA)
-        CFURLConnectionUseCredential(d->m_connection.get(), credential.cfCredential(), challenge.cfURLAuthChallengeRef());
-#else
         RetainPtr<CFURLCredentialRef> cfCredential = adoptCF(createCF(credential));
         CFURLConnectionUseCredential(d->m_connection.get(), cfCredential.get(), challenge.cfURLAuthChallengeRef());
-#endif
     }
 
     clearAuthentication();
@@ -624,30 +558,6 @@ void ResourceHandle::platformSetDefersLoading(bool defers)
         CFURLConnectionResume(d->m_connection.get());
 }
 
-#if PLATFORM(COCOA)
-void ResourceHandle::schedule(SchedulePair& pair)
-{
-    CFRunLoopRef runLoop = pair.runLoop();
-    if (!runLoop)
-        return;
-
-    CFURLConnectionScheduleWithRunLoop(d->m_connection.get(), runLoop, pair.mode());
-    if (d->m_startWhenScheduled) {
-        CFURLConnectionStart(d->m_connection.get());
-        d->m_startWhenScheduled = false;
-    }
-}
-
-void ResourceHandle::unschedule(SchedulePair& pair)
-{
-    CFRunLoopRef runLoop = pair.runLoop();
-    if (!runLoop)
-        return;
-
-    CFURLConnectionUnscheduleFromRunLoop(d->m_connection.get(), runLoop, pair.mode());
-}
-#endif
-
 const ResourceRequest& ResourceHandle::currentRequest() const
 {
     return d->m_currentRequest;
@@ -676,6 +586,6 @@ void ResourceHandle::continueWillCacheResponse(CFCachedURLResponseRef response)
 {
     d->m_connectionDelegate->continueWillCacheResponse(response);
 }
-#endif // USE(CFNETWORK)
+#endif // USE(CFURLCONNECTION)
 
 } // namespace WebCore
index d4bbf3f..51b2e9c 100644 (file)
 #include "config.h"
 #include "ResourceHandleCFURLConnectionDelegate.h"
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 
 #include "CFNetworkSPI.h"
 #include "FormDataStreamCFNet.h"
 #include "NetworkingContext.h"
 #include "ResourceHandle.h"
-
-#if PLATFORM(COCOA)
-#include "WebCoreSystemInterface.h"
-#endif
-
-#if PLATFORM(WIN)
 #include <WebKitSystemInterface/WebKitSystemInterface.h>
-#endif
 
 namespace WebCore {
 
@@ -218,4 +211,4 @@ CFURLConnectionClient_V6 ResourceHandleCFURLConnectionDelegate::makeConnectionCl
 
 } // namespace WebCore.
 
-#endif // USE(CFNETWORK)
+#endif // USE(CFURLCONNECTION)
index d4965a9..46c4edf 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef ResourceHandleCFURLConnectionDelegate_h
-#define ResourceHandleCFURLConnectionDelegate_h
+#pragma once
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 
 #include "ResourceRequest.h"
 #include <CFNetwork/CFURLConnectionPriv.h>
@@ -100,6 +99,4 @@ protected:
 
 } // namespace WebCore.
 
-#endif // USE(CFNETWORK)
-
-#endif // ResourceHandleCFURLConnectionDelegate_h
+#endif // USE(CFURLCONNECTION)
index 9f00c3a..a6f8b45 100644 (file)
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "ResourceHandleCFURLConnectionDelegateWithOperationQueue.h"
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 
 #include "AuthenticationCF.h"
 #include "AuthenticationChallenge.h"
@@ -75,9 +75,6 @@ void ResourceHandleCFURLConnectionDelegateWithOperationQueue::releaseHandle()
 
 void ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupRequest(CFMutableURLRequestRef request)
 {
-#if PLATFORM(IOS)
-    CFURLRequestSetShouldStartSynchronously(request, 1);
-#endif
     CFURLRef requestURL = CFURLRequestGetURL(request);
     if (!requestURL)
         return;
@@ -149,10 +146,8 @@ void ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse
             adjustMIMETypeIfNecessary(cfResponse, isMainResourceLoad);
         }
 
-#if !PLATFORM(IOS)
         if (_CFURLRequestCopyProtocolPropertyForKey(m_handle->firstRequest().cfURLRequest(DoNotUpdateHTTPBody), CFSTR("ForceHTMLMIMEType")))
             CFURLResponseSetMIMEType(cfResponse, CFSTR("text/html"));
-#endif // !PLATFORM(IOS)
         
         ResourceResponse resourceResponse(cfResponse);
 #if ENABLE(WEB_TIMING)
@@ -288,15 +283,7 @@ Boolean ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToPro
 
         LOG(Network, "CFNet - ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace(handle=%p) (%s)", m_handle, m_handle->firstRequest().url().string().utf8().data());
 
-        ProtectionSpace coreProtectionSpace = ProtectionSpace(protectionSpace);
-#if PLATFORM(IOS)
-        if (coreProtectionSpace.authenticationScheme() == ProtectionSpaceAuthenticationSchemeUnknown) {
-            m_boolResult = false;
-            dispatch_semaphore_signal(m_semaphore);
-            return;
-        }
-#endif // PLATFORM(IOS)
-        m_handle->canAuthenticateAgainstProtectionSpace(coreProtectionSpace);
+        m_handle->canAuthenticateAgainstProtectionSpace(ProtectionSpace(protectionSpace));
     });
     dispatch_semaphore_wait(m_semaphore, DISPATCH_TIME_FOREVER);
     return m_boolResult;
@@ -347,4 +334,4 @@ void ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueCanAuthent
 #endif // USE(PROTECTION_SPACE_AUTH_CALLBACK)
 } // namespace WebCore
 
-#endif // USE(CFNETWORK)
+#endif // USE(CFURLCONNECTION)
index da0b1d4..f7788ea 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef ResourceHandleCFURLConnectionDelegateWithOperationQueue_h
-#define ResourceHandleCFURLConnectionDelegateWithOperationQueue_h
+#pragma once
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 
 #include "ResourceHandleCFURLConnectionDelegate.h"
 #include <CFNetwork/CFNetwork.h>
@@ -80,6 +79,4 @@ private:
 
 } // namespace WebCore.
 
-#endif // USE(CFNETWORK)
-
-#endif // ResourceHandleCFURLConnectionDelegateWithOperationQueue_h
+#endif // USE(CFURLCONNECTION)
index 466b024..05c52a0 100644 (file)
@@ -31,7 +31,7 @@
 
 OBJC_CLASS NSURLRequest;
 
-#if PLATFORM(COCOA) || USE(CFNETWORK)
+#if PLATFORM(COCOA) || USE(CFURLCONNECTION)
 typedef const struct _CFURLRequest* CFURLRequestRef;
 typedef const struct __CFURLStorageSession* CFURLStorageSessionRef;
 #endif
@@ -61,13 +61,7 @@ public:
     {
     }
     
-#if USE(CFNETWORK)
-#if PLATFORM(COCOA)
-    WEBCORE_EXPORT ResourceRequest(NSURLRequest *);
-    void updateNSURLRequest();
-    void clearOrUpdateNSURLRequest();
-#endif
-
+#if USE(CFURLCONNECTION)
     ResourceRequest(CFURLRequestRef cfRequest)
         : ResourceRequestBase()
         , m_cfRequest(cfRequest)
@@ -84,11 +78,7 @@ public:
     WEBCORE_EXPORT void updateFromDelegatePreservingOldProperties(const ResourceRequest&);
 
 #if PLATFORM(COCOA)
-#if USE(CFNETWORK)
-    bool encodingRequiresPlatformData() const { return m_httpBody || m_cfRequest; }
-#else
     bool encodingRequiresPlatformData() const { return m_httpBody || m_nsRequest; }
-#endif
     WEBCORE_EXPORT NSURLRequest *nsURLRequest(HTTPBodyUpdatePolicy) const;
 
     WEBCORE_EXPORT static CFStringRef isUserInitiatedKey();
@@ -105,7 +95,7 @@ public:
     void setDomainForCachePartition(const String& domain) { m_cachePartition = partitionName(domain); }
 #endif
 
-#if PLATFORM(COCOA) || USE(CFNETWORK)
+#if PLATFORM(COCOA) || USE(CFURLCONNECTION)
     WEBCORE_EXPORT CFURLRequestRef cfURLRequest(HTTPBodyUpdatePolicy) const;
     void setStorageSession(CFURLStorageSessionRef);
 #endif
@@ -125,7 +115,7 @@ private:
 
     void doPlatformSetAsIsolatedCopy(const ResourceRequest&);
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
     RetainPtr<CFURLRequestRef> m_cfRequest;
 #endif
 #if PLATFORM(COCOA)
index 90e40f1..abc1d72 100644 (file)
@@ -34,7 +34,7 @@
 #include "PublicSuffix.h"
 #endif
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 #include "FormDataStreamCFNet.h"
 #include <CFNetwork/CFURLRequestPriv.h>
 #include <wtf/text/CString.h>
@@ -59,12 +59,11 @@ bool ResourceRequest::s_httpPipeliningEnabled = true;
 bool ResourceRequest::s_httpPipeliningEnabled = false;
 #endif
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 
 typedef void (*CFURLRequestSetContentDispositionEncodingFallbackArrayFunction)(CFMutableURLRequestRef, CFArrayRef);
 typedef CFArrayRef (*CFURLRequestCopyContentDispositionEncodingFallbackArrayFunction)(CFURLRequestRef);
 
-#if PLATFORM(WIN)
 static HMODULE findCFNetworkModule()
 {
 #ifndef DEBUG_ALL
@@ -83,17 +82,6 @@ static CFURLRequestCopyContentDispositionEncodingFallbackArrayFunction findCFURL
 {
     return reinterpret_cast<CFURLRequestCopyContentDispositionEncodingFallbackArrayFunction>(GetProcAddress(findCFNetworkModule(), "_CFURLRequestCopyContentDispositionEncodingFallbackArray"));
 }
-#elif PLATFORM(COCOA)
-static CFURLRequestSetContentDispositionEncodingFallbackArrayFunction findCFURLRequestSetContentDispositionEncodingFallbackArrayFunction()
-{
-    return reinterpret_cast<CFURLRequestSetContentDispositionEncodingFallbackArrayFunction>(dlsym(RTLD_DEFAULT, "_CFURLRequestSetContentDispositionEncodingFallbackArray"));
-}
-
-static CFURLRequestCopyContentDispositionEncodingFallbackArrayFunction findCFURLRequestCopyContentDispositionEncodingFallbackArrayFunction()
-{
-    return reinterpret_cast<CFURLRequestCopyContentDispositionEncodingFallbackArrayFunction>(dlsym(RTLD_DEFAULT, "_CFURLRequestCopyContentDispositionEncodingFallbackArray"));
-}
-#endif
 
 static void setContentDispositionEncodingFallbackArray(CFMutableURLRequestRef request, CFArrayRef fallbackArray)
 {
@@ -156,10 +144,6 @@ void ResourceRequest::doUpdatePlatformRequest()
     if (resourcePrioritiesEnabled())
         CFURLRequestSetRequestPriority(cfRequest, toPlatformRequestPriority(priority()));
 
-#if !PLATFORM(WIN)
-    _CFURLRequestSetProtocolProperty(cfRequest, kCFURLRequestAllowAllPOSTCaching, kCFBooleanTrue);
-#endif
-
     setHeaderFields(cfRequest, httpHeaderFields());
 
     CFURLRequestSetShouldHandleHTTPCookies(cfRequest, allowCookies());
@@ -184,9 +168,6 @@ void ResourceRequest::doUpdatePlatformRequest()
 #endif
 
     m_cfRequest = adoptCF(cfRequest);
-#if PLATFORM(COCOA)
-    clearOrUpdateNSURLRequest();
-#endif
 }
 
 void ResourceRequest::doUpdatePlatformHTTPBody()
@@ -219,30 +200,12 @@ void ResourceRequest::doUpdatePlatformHTTPBody()
     }
 
     m_cfRequest = adoptCF(cfRequest);
-#if PLATFORM(COCOA)
-    clearOrUpdateNSURLRequest();
-#endif
 }
 
 void ResourceRequest::doUpdateResourceRequest()
 {
     if (!m_cfRequest) {
-#if PLATFORM(IOS)
-        // <rdar://problem/9913526>
-        // This is a hack to mimic the subtle behaviour of the Foundation based ResourceRequest
-        // code. That code does not reset m_httpMethod if the NSURLRequest is nil. I filed
-        // <https://bugs.webkit.org/show_bug.cgi?id=66336> to track that.
-        // Another related bug is <https://bugs.webkit.org/show_bug.cgi?id=66350>. Fixing that
-        // would, ideally, allow us to not have this hack. But unfortunately that caused layout test
-        // failures.
-        // Removal of this hack is tracked by <rdar://problem/9970499>.
-
-        String httpMethod = m_httpMethod;
         *this = ResourceRequest();
-        m_httpMethod = httpMethod;
-#else
-        *this = ResourceRequest();
-#endif
         return;
     }
 
@@ -317,12 +280,9 @@ void ResourceRequest::setStorageSession(CFURLStorageSessionRef storageSession)
     if (storageSession)
         _CFURLRequestSetStorageSession(cfRequest, storageSession);
     m_cfRequest = adoptCF(cfRequest);
-#if PLATFORM(COCOA)
-    clearOrUpdateNSURLRequest();
-#endif
 }
 
-#endif // USE(CFNETWORK)
+#endif // USE(CFURLCONNECTION)
 
 void ResourceRequest::updateFromDelegatePreservingOldProperties(const ResourceRequest& delegateProvidedRequest)
 {
index cbc49e1..cdd674b 100644 (file)
@@ -23,8 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef ResourceRequestCFNet_h
-#define ResourceRequestCFNet_h
+#pragma once
 
 #include "CFNetworkSPI.h"
 #include "ResourceLoadPriority.h"
@@ -33,7 +32,7 @@ namespace WebCore {
 
 class ResourceRequest;
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 void getResourceRequest(ResourceRequest&, CFURLRequestRef);
 CFURLRequestRef cfURLRequest(const ResourceRequest&);
 #endif
@@ -78,5 +77,3 @@ inline CFURLRequestPriority toPlatformRequestPriority(ResourceLoadPriority prior
 }
 
 } // namespace WebCore
-
-#endif // ResourceRequestCFNet_h
index 5e71bc6..2fa4272 100644 (file)
@@ -28,7 +28,7 @@
 #include "ResourceResponseBase.h"
 #include <wtf/RetainPtr.h>
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 #include "CFNetworkSPI.h"
 #endif
 
@@ -43,16 +43,13 @@ public:
     {
     }
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
     ResourceResponse(CFURLResponseRef cfResponse)
         : m_initLevel(Uninitialized)
         , m_cfResponse(cfResponse)
     {
         m_isNull = !cfResponse;
     }
-#if PLATFORM(COCOA)
-    WEBCORE_EXPORT ResourceResponse(NSURLResponse *);
-#endif
 #else
     ResourceResponse(NSURLResponse *nsResponse)
         : m_initLevel(Uninitialized)
@@ -84,7 +81,7 @@ public:
          */
     }
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
     WEBCORE_EXPORT CFURLResponseRef cfURLResponse() const;
 #endif
 #if PLATFORM(COCOA)
@@ -108,10 +105,9 @@ private:
 
     unsigned m_initLevel : 3;
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
     mutable RetainPtr<CFURLResponseRef> m_cfResponse;
-#endif
-#if PLATFORM(COCOA)
+#elif PLATFORM(COCOA)
     mutable RetainPtr<NSURLResponse> m_nsResponse;
 #endif
 };
index e82ab3a..7885b06 100644 (file)
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "ResourceResponse.h"
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 
 #include "CFNetworkSPI.h"
 
 #include "MIMETypeRegistry.h"
 #include <wtf/RetainPtr.h>
 
-#if PLATFORM(COCOA)
-#include "WebCoreSystemInterface.h"
-#endif
-
 namespace WebCore {
 
 static CFStringRef const commonHeaderFields[] = {
@@ -47,13 +43,9 @@ static CFStringRef const commonHeaderFields[] = {
 CFURLResponseRef ResourceResponse::cfURLResponse() const
 {
     if (!m_cfResponse && !m_isNull) {
-#if PLATFORM(COCOA)
-        nsURLResponse();
-#else
         RetainPtr<CFURLRef> url = m_url.createCFURL();
         // FIXME: This creates a very incomplete CFURLResponse, which does not even have a status code.
         m_cfResponse = adoptCF(CFURLResponseCreate(0, url.get(), m_mimeType.string().createCFString().get(), m_expectedContentLength, m_textEncodingName.string().createCFString().get(), kCFURLCacheStorageAllowed));
-#endif
     }
 
     return m_cfResponse.get();
@@ -116,12 +108,10 @@ void ResourceResponse::platformLazyInit(InitLevel initLevel)
     m_initLevel = initLevel;
 }
 
-#if !PLATFORM(COCOA)
 CertificateInfo ResourceResponse::platformCertificateInfo() const
 {
     return { };
 }
-#endif
 
 String ResourceResponse::platformSuggestedFilename() const
 {
@@ -142,4 +132,4 @@ bool ResourceResponse::platformCompare(const ResourceResponse& a, const Resource
 
 } // namespace WebCore
 
-#endif // USE(CFNETWORK)
+#endif // USE(CFURLCONNECTION)
index 6575808..eec886e 100644 (file)
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "SynchronousLoaderClient.h"
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 
 #include "AuthenticationChallenge.h"
 #include "ResourceHandle.h"
@@ -48,4 +48,4 @@ ResourceError SynchronousLoaderClient::platformBadResponseError()
 
 } // namespace WebCore
 
-#endif // USE(CFNETWORK)
+#endif // USE(CFURLCONNECTION)
index 3d6ff25..df2d6d4 100644 (file)
 #include "config.h"
 #include "SynchronousResourceHandleCFURLConnectionDelegate.h"
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 
 #include "AuthenticationCF.h"
 #include "AuthenticationChallenge.h"
 #include "LoaderRunLoopCF.h"
 #include "Logging.h"
+#include "MIMETypeRegistry.h"
 #include "ResourceHandle.h"
 #include "ResourceHandleClient.h"
 #include "ResourceResponse.h"
 #include <wtf/text/CString.h>
 #include <wtf/text/WTFString.h>
 
-#if PLATFORM(COCOA)
-#include "CFNetworkSPI.h"
-#include "WebCoreSystemInterface.h"
-#include "WebCoreURLResponse.h"
-#endif // PLATFORM(COCOA)
-
-#if PLATFORM(IOS)
-#include "WebCoreThread.h"
-#endif // PLATFORM(IOS)
-
-#if PLATFORM(WIN)
-#include "MIMETypeRegistry.h"
-#endif // PLATFORM(WIN)
-
 namespace WebCore {
 
 SynchronousResourceHandleCFURLConnectionDelegate::SynchronousResourceHandleCFURLConnectionDelegate(ResourceHandle* handle)
@@ -63,20 +50,11 @@ SynchronousResourceHandleCFURLConnectionDelegate::SynchronousResourceHandleCFURL
 
 void SynchronousResourceHandleCFURLConnectionDelegate::setupRequest(CFMutableURLRequestRef request)
 {
-#if PLATFORM(IOS)
-    CFURLRequestSetShouldStartSynchronously(request, 1);
-#endif
 }
 
 void SynchronousResourceHandleCFURLConnectionDelegate::setupConnectionScheduling(CFURLConnectionRef connection)
 {
-#if PLATFORM(WIN)
     CFURLConnectionScheduleWithCurrentMessageQueue(connection);
-#elif PLATFORM(IOS)
-    CFURLConnectionScheduleWithRunLoop(connection, WebThreadRunLoop(), kCFRunLoopDefaultMode);
-#else
-    CFURLConnectionScheduleWithRunLoop(connection, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
-#endif
     CFURLConnectionScheduleDownloadWithRunLoop(connection, loaderRunLoop(), kCFRunLoopDefaultMode);
 }
 
@@ -103,7 +81,6 @@ CFURLRequestRef SynchronousResourceHandleCFURLConnectionDelegate::willSendReques
     return newCFRequest;
 }
 
-#if !PLATFORM(COCOA)
 static void setDefaultMIMEType(CFURLResponseRef response)
 {
     static CFStringRef defaultMIMETypeString = defaultMIMEType().createCFString().leakRef();
@@ -133,7 +110,6 @@ static void adjustMIMETypeIfNecessary(CFURLResponseRef cfResponse)
     if (result != originalResult)
         CFURLResponseSetMIMEType(cfResponse, result.get());
 }
-#endif // !PLATFORM(COCOA)
 
 void SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse(CFURLConnectionRef connection, CFURLResponseRef cfResponse)
 {
@@ -142,21 +118,6 @@ void SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse(CFURLC
     if (!m_handle->client())
         return;
 
-#if PLATFORM(COCOA)
-    // Avoid MIME type sniffing if the response comes back as 304 Not Modified.
-    auto msg = CFURLResponseGetHTTPResponse(cfResponse);
-    int statusCode = msg ? CFHTTPMessageGetResponseStatusCode(msg) : 0;
-
-    if (statusCode != 304) {
-        bool isMainResourceLoad = m_handle->firstRequest().requester() == ResourceRequest::Requester::Main;
-        adjustMIMETypeIfNecessary(cfResponse, isMainResourceLoad);
-    }
-
-#if !PLATFORM(IOS)
-    if (_CFURLRequestCopyProtocolPropertyForKey(m_handle->firstRequest().cfURLRequest(DoNotUpdateHTTPBody), CFSTR("ForceHTMLMIMEType")))
-        CFURLResponseSetMIMEType(cfResponse, CFSTR("text/html"));
-#endif // !PLATFORM(IOS)
-#else
     if (!CFURLResponseGetMIMEType(cfResponse))
         adjustMIMETypeIfNecessary(cfResponse);
 
@@ -165,7 +126,6 @@ void SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse(CFURLC
         ASSERT(!m_handle->shouldContentSniff());
         setDefaultMIMEType(cfResponse);
     }
-#endif
 
 #if USE(QUICK_LOOK)
     m_handle->setQuickLookHandle(QuickLookHandle::create(m_handle, this, cfResponse));
@@ -174,11 +134,7 @@ void SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse(CFURLC
 #endif
     
     ResourceResponse resourceResponse(cfResponse);
-#if PLATFORM(COCOA) && ENABLE(WEB_TIMING)
-    ResourceHandle::getConnectionTimingData(connection, resourceResponse.networkLoadTiming());
-#else
     UNUSED_PARAM(connection);
-#endif
     
     m_handle->client()->didReceiveResponse(m_handle, WTFMove(resourceResponse));
 }
@@ -224,7 +180,6 @@ void SynchronousResourceHandleCFURLConnectionDelegate::didFail(CFErrorRef error)
 
 CFCachedURLResponseRef SynchronousResourceHandleCFURLConnectionDelegate::willCacheResponse(CFCachedURLResponseRef cachedResponse)
 {
-#if PLATFORM(WIN)
     // Workaround for <rdar://problem/6300990> Caching does not respect Vary HTTP header.
     // FIXME: WebCore cache has issues with Vary, too (bug 58797, bug 71509).
     CFURLResponseRef wrappedResponse = CFCachedURLResponseGetWrappedResponse(cachedResponse);
@@ -234,16 +189,8 @@ CFCachedURLResponseRef SynchronousResourceHandleCFURLConnectionDelegate::willCac
         if (varyValue)
             return 0;
     }
-#endif // PLATFORM(WIN)
-
-#if PLATFORM(WIN)
     if (m_handle->client() && !m_handle->client()->shouldCacheResponse(m_handle, cachedResponse))
         return 0;
-#else
-    CFCachedURLResponseRef newResponse = m_handle->client()->willCacheResponse(m_handle, cachedResponse);
-    if (newResponse != cachedResponse)
-        return newResponse;
-#endif
 
     CFRetain(cachedResponse);
     return cachedResponse;
@@ -280,14 +227,7 @@ Boolean SynchronousResourceHandleCFURLConnectionDelegate::canRespondToProtection
 
     LOG(Network, "CFNet - SynchronousResourceHandleCFURLConnectionDelegate::canRespondToProtectionSpace(handle=%p (%s)", m_handle, m_handle->firstRequest().url().string().utf8().data());
 
-#if PLATFORM(IOS)
-    ProtectionSpace coreProtectionSpace = ProtectionSpace(protectionSpace);
-    if (coreProtectionSpace.authenticationScheme() == ProtectionSpaceAuthenticationSchemeUnknown)
-        return false;
-    return m_handle->canAuthenticateAgainstProtectionSpace(coreProtectionSpace);
-#else
     return m_handle->canAuthenticateAgainstProtectionSpace(core(protectionSpace));
-#endif
 }
 #endif // USE(PROTECTION_SPACE_AUTH_CALLBACK)
 
index 9789f89..15138ee 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef SynchronousResourceHandleCFURLConnectionDelegate_h
-#define SynchronousResourceHandleCFURLConnectionDelegate_h
+#pragma once
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 
 #include "ResourceHandleCFURLConnectionDelegate.h"
 
@@ -67,6 +66,4 @@ private:
 
 } // namespace WebCore.
 
-#endif // USE(CFNETWORK)
-
-#endif // ResourceHandleCFURLConnectionDelegate_h
+#endif // USE(CFURLCONNECTION)
index ec822e4..93def91 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef CredentialCocoa_h
-#define CredentialCocoa_h
+#pragma once
 
 #include "CredentialBase.h"
 #include <Security/SecBase.h>
 #include <wtf/RetainPtr.h>
 
-#if USE(CFNETWORK)
-#include "CFNetworkSPI.h"
-#endif
-
 OBJC_CLASS NSURLCredential;
 
 namespace WebCore {
@@ -52,18 +47,12 @@ public:
 
     Credential(const Credential&, CredentialPersistence);
 
-#if USE(CFNETWORK)
-    explicit Credential(CFURLCredentialRef);
-#endif
     WEBCORE_EXPORT explicit Credential(NSURLCredential *);
 
     WEBCORE_EXPORT bool isEmpty() const;
 
     bool encodingRequiresPlatformData() const { return m_nsCredential && encodingRequiresPlatformData(m_nsCredential.get()); }
 
-#if USE(CFNETWORK)
-    CFURLCredentialRef cfCredential() const;
-#endif
     WEBCORE_EXPORT NSURLCredential *nsCredential() const;
 
     static bool platformCompare(const Credential&, const Credential&);
@@ -75,5 +64,3 @@ private:
 };
 
 } // namespace WebCore
-
-#endif // CredentialCocoa_h
index d6961b6..7e05c46 100644 (file)
 #import "config.h"
 #import "CredentialCocoa.h"
 
-#if USE(CFNETWORK)
-@interface NSURLCredential (WebDetails)
-- (id)_initWithCFURLCredential:(CFURLCredentialRef)credential;
-- (CFURLCredentialRef) _CFURLCredential;
-@end
-#endif
-
 namespace WebCore {
 
 static NSURLCredentialPersistence toNSURLCredentialPersistence(CredentialPersistence persistence)
@@ -84,26 +77,12 @@ Credential::Credential(const Credential& original, CredentialPersistence persist
     }
 }
 
-#if USE(CFNETWORK)
-Credential::Credential(CFURLCredentialRef credential)
-    : Credential(adoptNS([[NSURLCredential alloc] _initWithCFURLCredential:credential]).get())
-{
-}
-#endif
-
 Credential::Credential(NSURLCredential *credential)
     : CredentialBase(credential.user, credential.password, toCredentialPersistence(credential.persistence))
     , m_nsCredential(credential)
 {
 }
 
-#if USE(CFNETWORK)
-CFURLCredentialRef Credential::cfCredential() const
-{
-    return [nsCredential() _CFURLCredential];
-}
-#endif
-
 NSURLCredential *Credential::nsCredential() const
 {
     if (m_nsCredential)
index 74882d7..f490c6c 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef ProtectionSpaceCocoa_h
-#define ProtectionSpaceCocoa_h
+#pragma once
 
 #include "ProtectionSpaceBase.h"
 #include <wtf/RetainPtr.h>
 
-#if USE(CFNETWORK)
-typedef struct _CFURLProtectionSpace* CFURLProtectionSpaceRef;
-#endif
-
 OBJC_CLASS NSURLProtectionSpace;
 
 namespace WebCore {
@@ -47,9 +42,6 @@ public:
 
     ProtectionSpace(WTF::HashTableDeletedValueType deletedValue) : ProtectionSpaceBase(deletedValue) { }
 
-#if USE(CFNETWORK)
-    explicit ProtectionSpace(CFURLProtectionSpaceRef);
-#endif
     WEBCORE_EXPORT explicit ProtectionSpace(NSURLProtectionSpace *);
 
     static bool platformCompare(const ProtectionSpace& a, const ProtectionSpace& b);
@@ -58,9 +50,6 @@ public:
 
     WEBCORE_EXPORT bool receivesCredentialSecurely() const;
 
-#if USE(CFNETWORK)
-    CFURLProtectionSpaceRef cfSpace() const;
-#endif
     WEBCORE_EXPORT NSURLProtectionSpace *nsSpace() const;
 
 private:
@@ -70,5 +59,3 @@ private:
 };
 
 } // namespace WebCore
-
-#endif // ProtectionSpaceCocoa_h
index af4c4e0..ec89691 100644 (file)
 #import "config.h"
 #import "ProtectionSpaceCocoa.h"
 
-#if USE(CFNETWORK)
-@interface NSURLProtectionSpace (WebDetails)
-- (CFURLProtectionSpaceRef) _CFURLProtectionSpace;
-- (id)_initWithCFURLProtectionSpace:(CFURLProtectionSpaceRef)cfProtSpace;
-@end
-#endif
 
 namespace WebCore {
 
-#if USE(CFNETWORK)
-ProtectionSpace::ProtectionSpace(CFURLProtectionSpaceRef space)
-    : ProtectionSpace(adoptNS([[NSURLProtectionSpace alloc] _initWithCFURLProtectionSpace:space]).get())
-{
-}
-#endif
-
 static ProtectionSpaceServerType type(NSURLProtectionSpace *space)
 {
     if ([space isProxy]) {
@@ -105,13 +92,6 @@ ProtectionSpace::ProtectionSpace(NSURLProtectionSpace *space)
     m_nsSpace = space;
 }
 
-#if USE(CFNETWORK)
-CFURLProtectionSpaceRef ProtectionSpace::cfSpace() const
-{
-    return [nsSpace() _CFURLProtectionSpace];
-}
-#endif
-
 NSURLProtectionSpace *ProtectionSpace::nsSpace() const
 {
     if (m_nsSpace)
index 62901da..7593ab3 100644 (file)
@@ -53,15 +53,9 @@ namespace WebCore {
 NSURLRequest *ResourceRequest::nsURLRequest(HTTPBodyUpdatePolicy bodyPolicy) const
 {
     updatePlatformRequest(bodyPolicy);
-#if USE(CFNETWORK)
-    if (!m_nsRequest)
-        const_cast<ResourceRequest*>(this)->updateNSURLRequest();
-#endif
     return [[m_nsRequest.get() retain] autorelease];
 }
 
-#if !USE(CFNETWORK)
-
 CFURLRequestRef ResourceRequest::cfURLRequest(HTTPBodyUpdatePolicy bodyPolicy) const
 {
     return [nsURLRequest(bodyPolicy) _CFURLRequest];
@@ -214,8 +208,6 @@ void ResourceRequest::setStorageSession(CFURLStorageSessionRef storageSession)
     m_nsRequest = adoptNS(wkCopyRequestWithStorageSession(storageSession, m_nsRequest.get()));
 }
 
-#endif // USE(CFNETWORK)
-
 } // namespace WebCore
 
 #endif // PLATFORM(COCOA)
index 4de1685..d9d736a 100644 (file)
@@ -75,13 +75,8 @@ void ResourceResponse::disableLazyInitialization()
 
 CertificateInfo ResourceResponse::platformCertificateInfo() const
 {
-#if USE(CFNETWORK)
-    ASSERT(m_cfResponse);
-    CFURLResponseRef cfResponse = m_cfResponse.get();
-#else
     ASSERT(m_nsResponse);
     CFURLResponseRef cfResponse = [m_nsResponse _CFURLResponse];
-#endif
 
     if (!cfResponse)
         return { };
@@ -114,35 +109,6 @@ CertificateInfo ResourceResponse::platformCertificateInfo() const
 #endif
 }
 
-#if USE(CFNETWORK)
-
-NSURLResponse *ResourceResponse::nsURLResponse() const
-{
-    if (!m_nsResponse && !m_cfResponse && !m_isNull) {
-        initNSURLResponse();
-        m_cfResponse = [m_nsResponse.get() _CFURLResponse];
-        return m_nsResponse.get();
-    }
-
-    if (!m_cfResponse)
-        return nil;
-
-    if (!m_nsResponse)
-        m_nsResponse = [NSURLResponse _responseWithCFURLResponse:m_cfResponse.get()];
-
-    return m_nsResponse.get();
-}
-
-ResourceResponse::ResourceResponse(NSURLResponse* nsResponse)
-    : m_initLevel(Uninitialized)
-    , m_cfResponse([nsResponse _CFURLResponse])
-    , m_nsResponse(nsResponse)
-{
-    m_isNull = !nsResponse;
-}
-
-#else
-
 static NSString* const commonHeaderFields[] = {
     @"Age", @"Cache-Control", @"Content-Type", @"Date", @"Etag", @"Expires", @"Last-Modified", @"Pragma"
 };
@@ -242,8 +208,6 @@ bool ResourceResponse::platformCompare(const ResourceResponse& a, const Resource
     return a.nsURLResponse() == b.nsURLResponse();
 }
 
-#endif // USE(CFNETWORK)
-
 } // namespace WebCore
 
 #endif // PLATFORM(COCOA)
index 44824da..d13fcfc 100644 (file)
 #import <objc/objc-runtime.h>
 #import <wtf/RefPtr.h>
 
-#if USE(CFNETWORK)
-#include "CFNetworkSPI.h"
-#endif
-
 OBJC_CLASS NSData;
 OBJC_CLASS NSDictionary;
 OBJC_CLASS NSFileHandle;
@@ -81,9 +77,6 @@ public:
     WEBCORE_EXPORT static bool shouldCreateForMIMEType(const String&);
 
     static std::unique_ptr<QuickLookHandle> create(ResourceHandle*, NSURLConnection *, NSURLResponse *, id delegate);
-#if USE(CFNETWORK)
-    static std::unique_ptr<QuickLookHandle> create(ResourceHandle*, SynchronousResourceHandleCFURLConnectionDelegate*, CFURLResponseRef);
-#endif
     // FIXME: Use of ResourceLoader here is a platform violation.
     WEBCORE_EXPORT static std::unique_ptr<QuickLookHandle> create(ResourceLoader&, const ResourceResponse&);
 
@@ -95,9 +88,6 @@ public:
     WEBCORE_EXPORT void didFail();
 
     WEBCORE_EXPORT NSURLResponse *nsResponse();
-#if USE(CFNETWORK)
-    CFURLResponseRef cfResponse();
-#endif
 
     void setClient(PassRefPtr<QuickLookHandleClient> client) { m_client = client; }
 
index a68bde1..02c263f 100644 (file)
@@ -185,81 +185,6 @@ const char* WebCore::QLPreviewProtocol()
     return previewProtocol.get().data();
 }
 
-#if USE(CFNETWORK)
-// The way QuickLook works is we pass it an NSURLConnectionDelegate callback object at creation
-// time. Then we pass it all the data as we receive it. Once we've downloaded the full URL,
-// QuickLook turns around and send us, through this delegate, the HTML version of the file which we
-// pass on to WebCore. The flag m_finishedLoadingDataIntoConverter in QuickLookHandle decides
-// whether to pass the data to QuickLook or WebCore.
-//
-// This works fine when using NS APIs, but when using CFNetwork, we don't have a NSURLConnectionDelegate.
-// So we create WebQuickLookHandleAsDelegate as an intermediate delegate object and pass it to
-// QLPreviewConverter. The proxy delegate then forwards the messages on to the CFNetwork code.
-@interface WebQuickLookHandleAsDelegate : NSObject <NSURLConnectionDelegate, WebCoreResourceLoaderDelegate> {
-    RefPtr<SynchronousResourceHandleCFURLConnectionDelegate> m_connectionDelegate;
-}
-
-- (id)initWithConnectionDelegate:(SynchronousResourceHandleCFURLConnectionDelegate*)connectionDelegate;
-@end
-
-@implementation WebQuickLookHandleAsDelegate
-- (id)initWithConnectionDelegate:(SynchronousResourceHandleCFURLConnectionDelegate*)connectionDelegate
-{
-    self = [super init];
-    if (!self)
-        return nil;
-    m_connectionDelegate = connectionDelegate;
-    return self;
-}
-
-- (void)connection:(NSURLConnection *)connection didReceiveDataArray:(NSArray *)dataArray
-{
-    UNUSED_PARAM(connection);
-    if (!m_connectionDelegate)
-        return;
-    LOG(Network, "WebQuickLookHandleAsDelegate::didReceiveDataArray()");
-    m_connectionDelegate->didReceiveDataArray(reinterpret_cast<CFArrayRef>(dataArray));
-}
-
-- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data lengthReceived:(long long)lengthReceived
-{
-    UNUSED_PARAM(connection);
-    if (!m_connectionDelegate)
-        return;
-    LOG(Network, "WebQuickLookHandleAsDelegate::didReceiveData() - data length = %ld", (long)[data length]);
-
-    // QuickLook code sends us a nil data at times. The check below is the same as the one in
-    // ResourceHandleMac.cpp added for a different bug.
-    if (![data length])
-        return;
-    m_connectionDelegate->didReceiveData(reinterpret_cast<CFDataRef>(data), static_cast<int>(lengthReceived));
-}
-
-- (void)connectionDidFinishLoading:(NSURLConnection *)connection
-{
-    UNUSED_PARAM(connection);
-    if (!m_connectionDelegate)
-        return;
-    LOG(Network, "WebQuickLookHandleAsDelegate::didFinishLoading()");
-    m_connectionDelegate->didFinishLoading();
-}
-
-- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
-{
-    UNUSED_PARAM(connection);
-    if (!m_connectionDelegate)
-        return;
-    LOG(Network, "WebQuickLookHandleAsDelegate::didFail()");
-    m_connectionDelegate->didFail(reinterpret_cast<CFErrorRef>(error));
-}
-
-- (void)detachHandle
-{
-    m_connectionDelegate = nullptr;
-}
-@end
-#endif
-
 @interface WebResourceLoaderQuickLookDelegate : NSObject <NSURLConnectionDelegate, WebCoreResourceLoaderDelegate> {
     RefPtr<ResourceLoader> _resourceLoader;
     BOOL _hasSentDidReceiveResponse;
@@ -411,26 +336,6 @@ std::unique_ptr<QuickLookHandle> QuickLookHandle::create(ResourceHandle* handle,
     return quickLookHandle;
 }
 
-#if USE(CFNETWORK)
-std::unique_ptr<QuickLookHandle> QuickLookHandle::create(ResourceHandle* handle, SynchronousResourceHandleCFURLConnectionDelegate* connectionDelegate, CFURLResponseRef cfResponse)
-{
-    ASSERT_ARG(handle, handle);
-    if (handle->firstRequest().requester() != ResourceRequest::Requester::Main || ![QLPreviewGetSupportedMIMETypesSet() containsObject:(NSString *)CFURLResponseGetMIMEType(cfResponse)])
-        return nullptr;
-
-    NSURLResponse *nsResponse = [NSURLResponse _responseWithCFURLResponse:cfResponse];
-    WebQuickLookHandleAsDelegate *delegate = [[[WebQuickLookHandleAsDelegate alloc] initWithConnectionDelegate:connectionDelegate] autorelease];
-    std::unique_ptr<QuickLookHandle> quickLookHandle(new QuickLookHandle([handle->firstRequest().nsURLRequest(DoNotUpdateHTTPBody) URL], nil, nsResponse, delegate));
-    handle->client()->didCreateQuickLookHandle(*quickLookHandle);
-    return quickLookHandle;
-}
-
-CFURLResponseRef QuickLookHandle::cfResponse()
-{
-    return [m_nsResponse _CFURLResponse];
-}
-#endif
-
 bool QuickLookHandle::shouldCreateForMIMEType(const String& mimeType)
 {
     return [QLPreviewGetSupportedMIMETypesSet() containsObject:mimeType];
diff --git a/Source/WebCore/platform/network/ios/ResourceHandleIOS.mm b/Source/WebCore/platform/network/ios/ResourceHandleIOS.mm
deleted file mode 100644 (file)
index 667b9b1..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-//
-//  ResourceHandleIPhone.mm
-//  WebCore
-//
-//  Copyright 2011 Apple Inc. All rights reserved.
-//
-
-#import "config.h"
-#import "ResourceHandleInternal.h"
-
-#if USE(CFNETWORK)
-
-#import <CFNetwork/CFSocketStreamPriv.h>
-#import <Foundation/NSURLRequestPrivate.h>
-
-using namespace WebCore;
-
-namespace WebCore {
-
-CFMutableDictionaryRef ResourceHandle::createSSLPropertiesFromNSURLRequest(const ResourceRequest& request)
-{
-    NSString *host = request.url().host();
-    NSArray *certArray = [NSURLRequest allowsSpecificHTTPSCertificateForHost:host];
-    BOOL allowsAnyCertificate = [NSURLRequest allowsAnyHTTPSCertificateForHost:host];
-    if (!certArray && !allowsAnyCertificate)
-        return 0;
-
-    CFMutableDictionaryRef sslProps = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
-    if (certArray)
-        CFDictionarySetValue(sslProps, _kCFStreamSSLTrustedLeafCertificates, (CFTypeRef) certArray);
-
-    if (allowsAnyCertificate)
-        CFDictionarySetValue(sslProps, kCFStreamSSLValidatesCertificateChain, kCFBooleanFalse);
-    return sslProps;
-}
-
-}
-
-#endif
diff --git a/Source/WebCore/platform/network/ios/ResourceRequestIOS.mm b/Source/WebCore/platform/network/ios/ResourceRequestIOS.mm
deleted file mode 100644 (file)
index 7b7dc6b..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2014 Apple, Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "config.h"
-#import "ResourceRequest.h"
-
-#if PLATFORM(IOS)
-
-@interface NSURLRequest (WebNSURLRequestDetails)
-- (CFURLRequestRef)_CFURLRequest;
-- (id)_initWithCFURLRequest:(CFURLRequestRef)request;
-@end
-
-namespace WebCore {
-
-#if USE(CFNETWORK)
-
-ResourceRequest::ResourceRequest(NSURLRequest *nsRequest)
-    : ResourceRequestBase()
-    , m_cfRequest([nsRequest _CFURLRequest])
-    , m_nsRequest(nsRequest)
-{
-}
-
-void ResourceRequest::updateNSURLRequest()
-{
-    if (m_cfRequest)
-        m_nsRequest = adoptNS([[NSMutableURLRequest alloc] _initWithCFURLRequest:m_cfRequest.get()]);
-}
-
-void ResourceRequest::clearOrUpdateNSURLRequest()
-{
-    // There is client code that extends NSURLRequest and expects to get back, in the delegate
-    // callbacks, an object of the same type that they passed into WebKit. To keep then running, we
-    // create an object of the same type and return that. See <rdar://9843582>.
-    // Also, developers really really want an NSMutableURLRequest so try to create an
-    // NSMutableURLRequest instead of NSURLRequest.
-    static Class nsURLRequestClass = [NSURLRequest class];
-    static Class nsMutableURLRequestClass = [NSMutableURLRequest class];
-    Class requestClass = [m_nsRequest.get() class];
-
-    if (!m_cfRequest)
-        return;
-
-    if (requestClass && requestClass != nsURLRequestClass && requestClass != nsMutableURLRequestClass)
-        m_nsRequest = adoptNS([[requestClass alloc] _initWithCFURLRequest:m_cfRequest.get()]);
-    else
-        m_nsRequest = nullptr;
-}
-
-#endif // USE(CFNETWORK)
-
-} // namespace WebCore
-
-#endif // PLATFORM(IOS)
index b9290d3..4112dbe 100644 (file)
 #import <Foundation/NSURLAuthenticationChallenge.h>
 #import <Foundation/NSURLProtectionSpace.h>
 
-#if USE(CFNETWORK)
-#import "CFNSURLConnectionSPI.h"
-#endif
-
 using namespace WebCore;
 
 @interface WebCoreAuthenticationClientAsChallengeSender : NSObject <NSURLAuthenticationChallengeSender>
 {
     AuthenticationClient* m_client;
-#if USE(CFNETWORK)
-    CFURLAuthChallengeRef m_cfChallenge;
-#endif
 }
 - (id)initWithAuthenticationClient:(AuthenticationClient*)client;
 - (AuthenticationClient*)client;
@@ -101,47 +94,10 @@ using namespace WebCore;
         m_client->receivedCancellation(core(challenge));
 }
 
-#if USE(CFNETWORK)
-- (void)setCFChallenge:(CFURLAuthChallengeRef)challenge
-{
-    m_cfChallenge = challenge;
-}
-
-- (CFURLAuthChallengeRef)cfChallenge
-{
-    return m_cfChallenge;
-}
-#endif
-
 @end
 
 namespace WebCore {
 
-#if USE(CFNETWORK)
-
-AuthenticationChallenge core(NSURLAuthenticationChallenge *macChallenge)
-{
-    WebCoreAuthenticationClientAsChallengeSender *challengeSender = (WebCoreAuthenticationClientAsChallengeSender*) [macChallenge sender];
-    return AuthenticationChallenge([challengeSender cfChallenge], [challengeSender client]);
-}
-
-NSURLAuthenticationChallenge *mac(const AuthenticationChallenge& coreChallenge)
-{
-    AuthenticationClient* authClient = coreChallenge.authenticationClient();
-    RetainPtr<WebCoreAuthenticationClientAsChallengeSender> challengeSender = adoptNS([[WebCoreAuthenticationClientAsChallengeSender alloc] initWithAuthenticationClient:authClient]);
-    RetainPtr<CFURLAuthChallengeRef> authChallenge = coreChallenge.cfURLAuthChallengeRef();
-    if (!authChallenge)
-        authChallenge = adoptCF(createCF(coreChallenge));
-    [challengeSender.get() setCFChallenge:authChallenge.get()];
-#if PLATFORM(IOS)
-    return [[NSURLAuthenticationChallenge _createAuthenticationChallengeForCFAuthChallenge:authChallenge.get() sender:challengeSender.get()] autorelease];
-#else
-    return [[NSURLAuthenticationChallenge _authenticationChallengeForCFAuthChallenge:authChallenge.get() sender:challengeSender.get()] autorelease];
-#endif
-}
-
-#else
-
 AuthenticationChallenge::AuthenticationChallenge(const ProtectionSpace& protectionSpace,
                                                  const Credential& proposedCredential,
                                                  unsigned previousFailureCount,
@@ -215,6 +171,4 @@ AuthenticationChallenge core(NSURLAuthenticationChallenge *macChallenge)
     return AuthenticationChallenge(macChallenge);
 }
 
-#endif // USE(CFNETWORK)
-
 } // namespace WebCore
index 1a0cc7b..07eea1c 100644 (file)
 #import "PlatformCookieJar.h"
 
 #import "CFNetworkSPI.h"
-#import "NetworkStorageSession.h"
-#import "WebCoreSystemInterface.h"
-#import <wtf/BlockObjCExceptions.h>
-
-namespace WebCore {
-static NSHTTPCookieStorage *cookieStorage(const NetworkStorageSession&);
-}
-
-#if !USE(CFNETWORK)
-
 #import "Cookie.h"
 #import "CookieStorage.h"
+#import "NetworkStorageSession.h"
 #import "URL.h"
+#import "WebCoreSystemInterface.h"
+#import <wtf/BlockObjCExceptions.h>
 #import <wtf/Optional.h>
 #import <wtf/text/StringBuilder.h>
 
@@ -191,6 +184,7 @@ void setCookiesFromDOM(const NetworkStorageSession& session, const URL& firstPar
     NSURL *cookieURL = url;
     NSDictionary *headerFields = [NSDictionary dictionaryWithObject:cookieString forKey:@"Set-Cookie"];
 
+    // FIXME: Is this needed on iOS, too?
 #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100
     NSArray *unfilteredCookies = [NSHTTPCookie _parsedCookiesWithResponseHeaderFields:headerFields forURL:cookieURL];
 #else
@@ -260,6 +254,15 @@ void deleteCookie(const NetworkStorageSession& session, const URL& url, const St
     END_BLOCK_OBJC_EXCEPTIONS;
 }
 
+static NSHTTPCookieStorage *cookieStorage(const NetworkStorageSession& session)
+{
+    auto cookieStorage = session.cookieStorage();
+    if (!cookieStorage || [NSHTTPCookieStorage sharedHTTPCookieStorage]._cookieStorage == cookieStorage)
+        return [NSHTTPCookieStorage sharedHTTPCookieStorage];
+    
+    return [[[NSHTTPCookieStorage alloc] _initWithCFHTTPCookieStorage:cookieStorage.get()] autorelease];
+}
+
 void addCookie(const NetworkStorageSession& session, const URL& url, const Cookie& cookie)
 {
     BEGIN_BLOCK_OBJC_EXCEPTIONS;
@@ -280,12 +283,10 @@ void addCookie(const NetworkStorageSession& session, const URL& url, const Cooki
         NSHTTPCookieExpires: [NSDate dateWithTimeIntervalSince1970:cookie.expires / 1000.0],
     }];
 
-#if !USE(CFNETWORK)
     if (!cookieStorage) {
         [WebCore::cookieStorage(session) setCookie:httpCookie];
         return;
     }
-#endif // !USE(CFNETWORK)
 
     CFHTTPCookieStorageSetCookie(cookieStorage.get(), [httpCookie _CFHTTPCookie]);
 
@@ -309,21 +310,6 @@ void deleteAllCookies(const NetworkStorageSession& session)
     wkDeleteAllHTTPCookies(session.cookieStorage().get());
 }
 
-}
-
-#endif // !USE(CFNETWORK)
-
-namespace WebCore {
-
-static NSHTTPCookieStorage *cookieStorage(const NetworkStorageSession& session)
-{
-    auto cookieStorage = session.cookieStorage();
-    if (!cookieStorage || [NSHTTPCookieStorage sharedHTTPCookieStorage]._cookieStorage == cookieStorage)
-        return [NSHTTPCookieStorage sharedHTTPCookieStorage];
-
-    return [[[NSHTTPCookieStorage alloc] _initWithCFHTTPCookieStorage:cookieStorage.get()] autorelease];
-}
-
 void deleteCookiesForHostnames(const NetworkStorageSession& session, const Vector<String>& hostnames)
 {
     BEGIN_BLOCK_OBJC_EXCEPTIONS;
@@ -353,7 +339,6 @@ void deleteCookiesForHostnames(const NetworkStorageSession& session, const Vecto
     END_BLOCK_OBJC_EXCEPTIONS;
 }
 
-
 void deleteAllCookiesModifiedSince(const NetworkStorageSession& session, std::chrono::system_clock::time_point timePoint)
 {
     if (![NSHTTPCookieStorage instancesRespondToSelector:@selector(removeCookiesSinceDate:)])
index 9ebc854..f0a4f3a 100644 (file)
@@ -26,8 +26,6 @@
 #include "config.h"
 #include "CredentialStorage.h"
 
-#if !USE(CFNETWORK)
-
 #include "AuthenticationMac.h"
 #include "Credential.h"
 #include "ProtectionSpace.h"
@@ -52,5 +50,3 @@ void CredentialStorage::saveToPersistentStorage(const ProtectionSpace& protectio
 #endif
 
 } // namespace WebCore
-
-#endif // !USE(CFNETWORK)
index b85ddcb..0e9b6d9 100644 (file)
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef FormDataStreamMac_h
-#define FormDataStreamMac_h
-
-#if !USE(CFNETWORK)
+#pragma once
 
 #include <wtf/Forward.h>
 
@@ -40,15 +37,11 @@ typedef const struct _CFURLRequest* CFURLRequestRef;
 
 namespace WebCore {
 
-    class FormData;
+class FormData;
 
-    void setHTTPBody(NSMutableURLRequest *, FormData*);
-    FormData* httpBodyFromStream(NSInputStream *);
+void setHTTPBody(NSMutableURLRequest *, FormData*);
+FormData* httpBodyFromStream(NSInputStream *);
 
-    CFStringRef formDataStreamLengthPropertyName();
+CFStringRef formDataStreamLengthPropertyName();
 
 } // namespace WebCore
-
-#endif // !USE(CFNETWORK)
-
-#endif // FormDataStreamMac_h
index f84d479..ac4e149 100644 (file)
@@ -29,8 +29,6 @@
 #import "config.h"
 #import "FormDataStreamMac.h"
 
-#if !USE(CFNETWORK)
-
 #import "FormData.h"
 #import "FormDataStreamCFNet.h"
 
@@ -51,5 +49,3 @@ FormData* httpBodyFromStream(NSInputStream *stream)
 }
 
 } // namespace WebCore
-
-#endif // !USE(CFNETWORK)
index 5c79a3e..709b699 100644 (file)
 #import <Foundation/Foundation.h>
 #import <wtf/BlockObjCExceptions.h>
 
-#if PLATFORM(IOS) && USE(CFNETWORK)
-#import <CFNetwork/CFSocketStreamPriv.h>
-#endif
-
 @interface NSError (WebExtras)
 - (NSString *)_web_localizedDescription;
 @end
@@ -91,85 +87,6 @@ static NSDictionary* dictionaryThatCanCode(NSDictionary* src)
 
 @end
 
-
-#if USE(CFNETWORK)
-static NSError *NSErrorFromCFError(CFErrorRef cfError, NSURL *url)
-{
-    CFIndex errCode = CFErrorGetCode(cfError);
-    if (CFEqual(CFErrorGetDomain(cfError), kCFErrorDomainCFNetwork) && errCode <= kCFURLErrorUnknown && errCode > -4000) {
-        // This is an URL error and needs to be translated to the NSURLErrorDomain
-        id keys[10], values[10];
-        CFDictionaryRef userInfo = CFErrorCopyUserInfo(cfError);
-        NSError *result;
-        NSInteger count = 0;
-
-        if (url) {
-            keys[count] = NSURLErrorFailingURLErrorKey;
-            values[count] = url;
-            count ++;
-
-            keys[count] = NSURLErrorFailingURLStringErrorKey;
-            values[count] = [url absoluteString];
-            count ++;
-        }
-
-        values[count] = (id)CFDictionaryGetValue(userInfo, kCFErrorLocalizedDescriptionKey);
-        if (values[count]) {
-            keys[count] = NSLocalizedDescriptionKey;
-            count ++;
-        }
-
-        values[count] = (id)CFDictionaryGetValue(userInfo, kCFErrorLocalizedFailureReasonKey);
-        if (values[count]) {
-            keys[count] = NSLocalizedFailureReasonErrorKey;
-            count ++;
-        }
-
-        values[count] = (id)CFDictionaryGetValue(userInfo, kCFErrorLocalizedRecoverySuggestionKey);
-        if (values[count]) {
-            keys[count] = NSLocalizedRecoverySuggestionErrorKey;
-            count ++;
-        }
-
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-        if (userInfo && (values[count] = (id)CFDictionaryGetValue(userInfo, kCFStreamPropertySSLPeerCertificates)) != nil) {
-            // Need to translate the cert
-            keys[count] = @"NSErrorPeerCertificateChainKey";
-            count ++;
-
-            values[count] = (id)CFDictionaryGetValue(userInfo, _kCFStreamPropertySSLClientCertificates);
-            if (values[count]) {
-                keys[count] = @"NSErrorClientCertificateChainKey";
-                count ++;
-            }
-
-            values[count] = (id)CFDictionaryGetValue(userInfo, _kCFStreamPropertySSLClientCertificateState);
-            if (values[count]) {
-                keys[count] = @"NSErrorClientCertificateStateKey";
-                count ++;
-            }
-        }
-#pragma clang diagnostic pop
-
-        if (userInfo && (values[count] = (id)CFDictionaryGetValue(userInfo, kCFStreamPropertySSLPeerTrust)) != nil) {
-            keys[count] = NSURLErrorFailingURLPeerTrustErrorKey;
-            count++;
-        }
-
-        keys[count] = NSUnderlyingErrorKey;
-        values[count] = (id)cfError;
-        count ++;
-
-        result = [WebCustomNSURLError errorWithDomain:NSURLErrorDomain code:(errCode == kCFURLErrorUnknown ? (CFIndex)NSURLErrorUnknown : errCode) userInfo:[NSDictionary dictionaryWithObjects:values forKeys:keys count:count]];
-        if (userInfo)
-            CFRelease(userInfo);
-        return result;
-    }
-    return (NSError *)cfError;
-}
-#endif // USE(CFNETWORK)
-
 #endif // PLATFORM(IOS)
 
 namespace WebCore {
@@ -190,53 +107,6 @@ static RetainPtr<NSError> createNSErrorFromResourceErrorBase(const ResourceError
     return adoptNS([[NSError alloc] initWithDomain:resourceError.domain() code:resourceError.errorCode() userInfo:userInfo.get()]);
 }
 
-#if USE(CFNETWORK)
-
-ResourceError::ResourceError(NSError *error)
-    : ResourceErrorBase(Type::Null)
-    , m_dataIsUpToDate(false)
-    , m_platformError(reinterpret_cast<CFErrorRef>(error))
-{
-    if (error)
-        setType(([error code] == NSURLErrorTimedOut) ? Type::Timeout : Type::General);
-}
-
-NSError *ResourceError::nsError() const
-{
-    if (isNull()) {
-        ASSERT(!m_platformError);
-        return nil;
-    }
-
-    if (m_platformNSError)
-        return m_platformNSError.get();
-
-    if (m_platformError) {
-        CFErrorRef error = m_platformError.get();
-        RetainPtr<CFDictionaryRef> userInfo = adoptCF(CFErrorCopyUserInfo(error));
-#if PLATFORM(IOS)
-        m_platformNSError = NSErrorFromCFError(error, (NSURL *)[(NSDictionary *)userInfo.get() objectForKey:(id) kCFURLErrorFailingURLErrorKey]);
-        // If NSErrorFromCFError created a new NSError for us, return that.
-        if (m_platformNSError.get() != (NSError *)error)
-            return m_platformNSError.get();
-
-        // Otherwise fall through to create a new NSError from the CFError.
-#endif
-        m_platformNSError = adoptNS([[NSError alloc] initWithDomain:(NSString *)CFErrorGetDomain(error) code:CFErrorGetCode(error) userInfo:(NSDictionary *)userInfo.get()]);
-        return m_platformNSError.get();
-    }
-
-    m_platformNSError = createNSErrorFromResourceErrorBase(*this);
-    return m_platformNSError.get();
-}
-
-ResourceError::operator NSError *() const
-{
-    return nsError();
-}
-
-#else
-
 ResourceError::ResourceError(NSError *nsError)
     : ResourceErrorBase(Type::Null)
     , m_dataIsUpToDate(false)
@@ -309,6 +179,4 @@ ResourceError::operator CFErrorRef() const
     return cfError();
 }
 
-#endif // USE(CFNETWORK)
-
 } // namespace WebCore
index 269fb51..c18350a 100644 (file)
 #import <wtf/text/Base64.h>
 #import <wtf/text/CString.h>
 
-#if USE(CFNETWORK)
-#if USE(APPLE_INTERNAL_SDK)
-#import <CFNetwork/CFURLConnectionPriv.h>
-#endif
-typedef struct _CFURLConnection* CFURLConnectionRef;
-extern "C" {
-CFDictionaryRef _CFURLConnectionCopyTimingData(CFURLConnectionRef);
-}
-#endif // USE(CFNETWORK)
-
 #if PLATFORM(IOS)
 #import "CFNetworkSPI.h"
 #import "RuntimeApplicationChecks.h"
@@ -90,8 +80,6 @@ using namespace WebCore;
 
 namespace WebCore {
     
-#if !USE(CFNETWORK)
-    
 static void applyBasicAuthorizationHeader(ResourceRequest& request, const Credential& credential)
 {
     String authenticationHeader = "Basic " + base64Encode(String(credential.user() + ":" + credential.password()).utf8());
@@ -329,8 +317,6 @@ void ResourceHandle::platformSetDefersLoading(bool defers)
         [d->m_connection setDefersCallbacks:defers];
 }
 
-#if !USE(CFNETWORK)
-
 void ResourceHandle::schedule(SchedulePair& pair)
 {
     NSRunLoop *runLoop = pair.nsRunLoop();
@@ -349,8 +335,6 @@ void ResourceHandle::unschedule(SchedulePair& pair)
         [d->m_connection.get() unscheduleFromRunLoop:runLoop forMode:(NSString *)pair.mode()];
 }
 
-#endif
-
 id ResourceHandle::makeDelegate(bool shouldUseCredentialStorage)
 {
     ASSERT(!d->m_delegate);
@@ -730,27 +714,14 @@ void ResourceHandle::continueWillCacheResponse(NSCachedURLResponse *response)
 
     [(id)delegate() continueWillCacheResponse:response];
 }
-    
-#endif // !USE(CFNETWORK)
-    
-#if ENABLE(WEB_TIMING)
 
-#if USE(CFNETWORK)
-    
-void ResourceHandle::getConnectionTimingData(CFURLConnectionRef connection, NetworkLoadTiming& timing)
-{
-    copyTimingData((__bridge NSDictionary*)adoptCF(_CFURLConnectionCopyTimingData(connection)).get(), timing);
-}
-    
-#else
+#if ENABLE(WEB_TIMING)
     
 void ResourceHandle::getConnectionTimingData(NSURLConnection *connection, NetworkLoadTiming& timing)
 {
     copyTimingData([connection _timingData], timing);
 }
     
-#endif
-    
 #endif // ENABLE(WEB_TIMING)
 
 } // namespace WebCore
diff --git a/Source/WebCore/platform/network/mac/ResourceRequestMac.mm b/Source/WebCore/platform/network/mac/ResourceRequestMac.mm
deleted file mode 100644 (file)
index 2d18caa..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2006, 2007, 2008 Apple, Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- */
-
-#import "config.h"
-#import "ResourceRequest.h"
-
-#if PLATFORM(MAC)
-
-#import <Foundation/Foundation.h>
-
-@interface NSURLRequest (WebNSURLRequestDetails)
-- (CFURLRequestRef)_CFURLRequest;
-- (id)_initWithCFURLRequest:(CFURLRequestRef)request;
-@end
-
-namespace WebCore {
-
-#if USE(CFNETWORK)
-
-ResourceRequest::ResourceRequest(NSURLRequest *nsRequest)
-    : ResourceRequestBase()
-    , m_cfRequest([nsRequest _CFURLRequest])
-    , m_nsRequest(nsRequest)
-{
-}
-
-void ResourceRequest::updateNSURLRequest()
-{
-    if (m_cfRequest)
-        m_nsRequest = adoptNS([[NSURLRequest alloc] _initWithCFURLRequest:m_cfRequest.get()]);
-}
-
-#endif
-
-} // namespace WebCore
-
-#endif
index 0144bd9..65f76df 100644 (file)
@@ -26,8 +26,6 @@
 #include "config.h"
 #include "SynchronousLoaderClient.h"
 
-#if !USE(CFNETWORK)
-
 #include "AuthenticationChallenge.h"
 
 namespace WebCore {
@@ -38,14 +36,10 @@ void SynchronousLoaderClient::didReceiveAuthenticationChallenge(ResourceHandle*,
     [challenge.sender() continueWithoutCredentialForAuthenticationChallenge:challenge.nsURLAuthenticationChallenge()];
 }
 
-#if !USE(CFNETWORK)
 ResourceError SynchronousLoaderClient::platformBadResponseError()
 {
     RetainPtr<NSError> error = adoptNS([[NSError alloc] initWithDomain:NSURLErrorDomain code:NSURLErrorBadServerResponse userInfo:nil]);
     return error.get();
 }
-#endif
 
 }
-
-#endif // !USE(CFNETWORK)
index aa7e1cb..5754165 100644 (file)
@@ -23,8 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef WebCoreResourceHandleAsDelegate_h
-#define WebCoreResourceHandleAsDelegate_h
+#pragma once
 
 namespace WebCore {
 class ResourceHandle;
@@ -34,13 +33,8 @@ class ResourceHandle;
 - (void)detachHandle;
 @end
 
-#if !USE(CFNETWORK)
-
 @interface WebCoreResourceHandleAsDelegate : NSObject <NSURLConnectionDelegate, WebCoreResourceLoaderDelegate> {
     WebCore::ResourceHandle* m_handle;
 }
 - (id)initWithHandle:(WebCore::ResourceHandle*)handle;
 @end
-
-#endif // !USE(CFNETWORK)
-#endif // WebCoreResourceHandleAsDelegate_h
index 2103a3f..dd592ff 100644 (file)
@@ -26,8 +26,6 @@
 #import "config.h"
 #import "WebCoreResourceHandleAsDelegate.h"
 
-#if !USE(CFNETWORK)
-
 #import "AuthenticationChallenge.h"
 #import "AuthenticationMac.h"
 #import "Logging.h"
@@ -270,6 +268,3 @@ using namespace WebCore;
 }
 
 @end
-
-#endif // !USE(CFNETWORK)
-
index babdad2..984b1e4 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef WebCoreResourceHandleAsOperationQueueDelegate_h
-#define WebCoreResourceHandleAsOperationQueueDelegate_h
-
-#if !USE(CFNETWORK)
+#pragma once
 
 #include "WebCoreResourceHandleAsDelegate.h"
 #include <dispatch/dispatch.h>
@@ -58,6 +55,3 @@ class ResourceHandle;
 @interface WebCoreResourceHandleWithCredentialStorageAsOperationQueueDelegate : WebCoreResourceHandleAsOperationQueueDelegate
 
 @end
-
-#endif // !USE(CFNETWORK)
-#endif // WebCoreResourceHandleAsOperationQueueDelegate_h
index 1fd1a6e..21b7678 100644 (file)
@@ -26,8 +26,6 @@
 #import "config.h"
 #import "WebCoreResourceHandleAsOperationQueueDelegate.h"
 
-#if !USE(CFNETWORK)
-
 #import "AuthenticationChallenge.h"
 #import "AuthenticationMac.h"
 #import "Logging.h"
@@ -329,6 +327,3 @@ using namespace WebCore;
 }
 
 @end
-
-#endif // !USE(CFNETWORK)
-
index bb3191a..007b109 100644 (file)
@@ -325,7 +325,6 @@ void adjustMIMETypeIfNecessary(CFURLResponseRef cfResponse, bool isMainResourceL
 }
 #endif
 
-#if !USE(CFNETWORK)
 NSURLResponse *synthesizeRedirectResponseIfNecessary(NSURLRequest *currentRequest, NSURLRequest *newRequest, NSURLResponse *redirectResponse)
 {
     if (redirectResponse)
@@ -339,6 +338,5 @@ NSURLResponse *synthesizeRedirectResponseIfNecessary(NSURLRequest *currentReques
     NSDictionary *synthesizedResponseHeaderFields = @{ @"Location": [[newRequest URL] absoluteString], @"Cache-Control": @"no-store" };
     return [[[NSHTTPURLResponse alloc] initWithURL:[currentRequest URL] statusCode:302 HTTPVersion:(NSString *)kCFHTTPVersion1_1 headerFields:synthesizedResponseHeaderFields] autorelease];
 }
-#endif
 
 }
index 65ccaef..1592cd1 100644 (file)
@@ -27,7 +27,7 @@
 
 #include "NotImplemented.h"
 #include "SSLKeyGenerator.h"
-#if !USE(CFNETWORK)
+#if !USE(CFURLCONNECTION)
 #include "CookieStorage.h"
 #endif
 
@@ -37,7 +37,7 @@ namespace WebCore {
 String signedPublicKeyAndChallengeString(unsigned, const String&, const URL&) { notImplemented(); return String(); }
 void getSupportedKeySizes(Vector<String>&) { notImplemented(); }
 
-#if !USE(CFNETWORK)
+#if !USE(CFURLCONNECTION)
 void startObservingCookieChanges(CookieChangeCallbackPtr) { notImplemented(); }
 void stopObservingCookieChanges() { notImplemented(); }
 #endif
index c5ff92d..da9b0fc 100644 (file)
 #define OBSOLETE_COLORSYNC_API
 #endif
 #endif
-#if USE(CFNETWORK)
-/* Windows doesn't include CFNetwork.h via CoreServices.h, so we do
-   it explicitly here to make Windows more consistent with Mac. */
+#if USE(CFURLCONNECTION)
 #include <CFNetwork/CFNetwork.h>
 // On Windows, dispatch.h needs to be included before certain CFNetwork headers.
 #include <dispatch/dispatch.h>
index f82ca6e..86f4e5f 100644 (file)
@@ -1,3 +1,13 @@
+2016-10-11  Alex Christensen  <achristensen@webkit.org>
+
+        Remove dead networking code
+        https://bugs.webkit.org/show_bug.cgi?id=163263
+
+        Reviewed by Daniel Bates.
+
+        * WebCoreSupport/WebResourceLoadScheduler.cpp:
+        (WebResourceLoadScheduler::scheduleLoad):
+
 2016-10-06  Brent Fulgham  <bfulgham@apple.com>
 
         Unreviewed build fix when building with Direct2D.
index cd9a5ad..27f837b 100644 (file)
@@ -149,7 +149,7 @@ void WebResourceLoadScheduler::scheduleLoad(ResourceLoader* resourceLoader)
     bool hadRequests = host->hasRequests();
     host->schedule(resourceLoader, priority);
 
-#if PLATFORM(COCOA) || USE(CFNETWORK)
+#if PLATFORM(COCOA) || USE(CFURLCONNECTION)
     if (ResourceRequest::resourcePrioritiesEnabled() && !isSuspendingPendingRequests()) {
         // Serve all requests at once to keep the pipeline full at the network layer.
         // FIXME: Does this code do anything useful, given that we also set maxRequestsInFlightPerHost to effectively unlimited on these platforms?
index 8d1610a..3d2cdb3 100644 (file)
@@ -1,3 +1,12 @@
+2016-10-11  Alex Christensen  <achristensen@webkit.org>
+
+        Remove dead networking code
+        https://bugs.webkit.org/show_bug.cgi?id=163263
+
+        Reviewed by Daniel Bates.
+
+        * WebCoreSupport/WebInspectorClientCF.cpp:
+
 2016-08-15  Joseph Pecoraro  <pecoraro@apple.com>
 
         Remove unused includes of wtf headers
index 278be71..a548f90 100644 (file)
@@ -27,8 +27,8 @@
 // before including any other files. Failing to include config.h will leave
 // USE_CF undefined, causing build failures in this
 // file. But Mac doesn't have a config.h for WebKit, so we can't include the
-// Windows one here. For now we can just define USE_CF and
-// USE_CFNETWORK manually, but we need a better long-term solution.
+// Windows one here. For now we can just define USE_CF manually,
+// but we need a better long-term solution.
 #ifndef USE_CF
 #define USE_CF 1
 #endif
index 6c17edd..7f3d273 100644 (file)
@@ -1,3 +1,21 @@
+2016-10-11  Alex Christensen  <achristensen@webkit.org>
+
+        Remove dead networking code
+        https://bugs.webkit.org/show_bug.cgi?id=163263
+
+        Reviewed by Daniel Bates.
+
+        * Misc/WebDownload.mm:
+        (-[WebDownload _initWithLoadingCFURLConnection:request:response:delegate:proxy:]): Deleted.
+        * Misc/WebDownloadInternal.h:
+        * WebCoreSupport/WebFrameLoaderClient.mm:
+        (WebFrameLoaderClient::convertMainResourceLoadToDownload):
+        * WebView/WebPreferences.mm:
+        (+[WebPreferences _setCurrentNetworkLoaderSessionCookieAcceptPolicy:]):
+        * WebView/WebView.mm:
+        (-[WebView scheduleInRunLoop:forMode:]):
+        (-[WebView unscheduleFromRunLoop:forMode:]):
+
 2016-10-10  Zan Dobersek  <zdobersek@igalia.com>
 
         Add ENABLE_ENCRYPTED_MEDIA configuration option
index c8a2642..29c854d 100644 (file)
 
 #import "WebTypesInternal.h"
 
-#if USE(CFNETWORK)
-#import <CFNetwork/CFNetwork.h>
-#import <CFNetwork/CFURLConnection.h>
-#endif
-
 using namespace WebCore;
 
 @class NSURLConnectionDelegateProxy;
@@ -61,14 +56,6 @@ using namespace WebCore;
               delegate:(id)delegate
              directory:(NSString *)directory;
 
-#if USE(CFNETWORK)
-- (id)_initWithLoadingCFURLConnection:(CFURLConnectionRef)connection
-                              request:(CFURLRequestRef)request
-                             response:(CFURLResponseRef)response
-                             delegate:(id)delegate
-                                proxy:(NSURLConnectionDelegateProxy *)proxy;
-#endif
-
 @end
 
 @interface WebDownloadInternal : NSObject <NSURLDownloadDelegate>
@@ -231,18 +218,6 @@ using namespace WebCore;
     return [super _initWithLoadingConnection:connection request:request response:response delegate:_webInternal proxy:proxy];
 }
 
-#if USE(CFNETWORK)
-- (id)_initWithLoadingCFURLConnection:(CFURLConnectionRef)connection
-                              request:(CFURLRequestRef)request
-                             response:(CFURLResponseRef)response
-                             delegate:(id)delegate
-                                proxy:(NSURLConnectionDelegateProxy *)proxy
-{
-    [self _setRealDelegate:delegate];
-    return [super _initWithLoadingCFURLConnection:connection request:request response:response delegate:_webInternal proxy:proxy];
-}
-#endif
-
 - (id)_initWithRequest:(NSURLRequest *)request
               delegate:(id)delegate
              directory:(NSString *)directory
index 9b2f395..e802d49 100644 (file)
 */
  
 #import <WebKitLegacy/WebDownload.h>
-
-#if USE(CFNETWORK)
-#import <CFNetwork/CFURLConnection.h>
-#endif
  
 @interface WebDownload (WebDownloadCreation)
 +(id)_downloadWithLoadingConnection:(NSURLConnection *)connection
                  delegate:(id)delegate
                 directory:(NSString *)directory;
 
-#if USE(CFNETWORK)
-+ (id)_downloadWithLoadingCFURLConnection:(CFURLConnectionRef)connection
-                                  request:(CFURLRequestRef)request
-                                 response:(CFURLResponseRef)response
-                                 delegate:(id)delegate
-                                    proxy:(id)proxy;
-#endif
-
 @end
index fc2fa2b..b4f5358 100644 (file)
@@ -304,13 +304,7 @@ void WebFrameLoaderClient::convertMainResourceLoadToDownload(DocumentLoader* doc
 
     ResourceHandle* handle = mainResourceLoader->handle();
 
-#if USE(CFNETWORK)
-    ASSERT([WebDownload respondsToSelector:@selector(_downloadWithLoadingCFURLConnection:request:response:delegate:proxy:)]);
-    auto connection = handle->releaseConnectionForDownload();
-    [WebDownload _downloadWithLoadingCFURLConnection:connection.get() request:request.cfURLRequest(UpdateHTTPBody) response:response.cfURLResponse() delegate:[webView downloadDelegate] proxy:nil];
-#else
     [WebDownload _downloadWithLoadingConnection:handle->connection() request:request.nsURLRequest(UpdateHTTPBody) response:response.nsURLResponse() delegate:[webView downloadDelegate] proxy:nil];
-#endif
 }
 
 bool WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache(DocumentLoader* loader, const ResourceRequest& request, const ResourceResponse& response, int length)
index 18ef0d1..bfe02f8 100644 (file)
@@ -1800,7 +1800,7 @@ static NSString *classIBCreatorID = nil;
 + (void)_setCurrentNetworkLoaderSessionCookieAcceptPolicy:(NSHTTPCookieAcceptPolicy)policy
 {
     RetainPtr<CFHTTPCookieStorageRef> cookieStorage = NetworkStorageSession::defaultStorageSession().cookieStorage();
-    ASSERT(cookieStorage); // Will fail when building without USE(CFNETWORK) and NetworkStorageSession::switchToNewTestingSession() was not called beforehand.
+    ASSERT(cookieStorage); // Will fail when NetworkStorageSession::switchToNewTestingSession() was not called beforehand.
     CFHTTPCookieStorageSetCookieAcceptPolicy(cookieStorage.get(), policy);
 }
 
index 53aa974..b02690f 100644 (file)
@@ -6779,24 +6779,14 @@ static WebFrame *incrementFrame(WebFrame *frame, WebFindOptions options = 0)
 
 - (void)scheduleInRunLoop:(NSRunLoop *)runLoop forMode:(NSString *)mode
 {
-#if USE(CFNETWORK)
-    CFRunLoopRef schedulePairRunLoop = [runLoop getCFRunLoop];
-#else
-    NSRunLoop *schedulePairRunLoop = runLoop;
-#endif
     if (runLoop && mode)
-        core(self)->addSchedulePair(SchedulePair::create(schedulePairRunLoop, (CFStringRef)mode));
+        core(self)->addSchedulePair(SchedulePair::create(runLoop, (CFStringRef)mode));
 }
 
 - (void)unscheduleFromRunLoop:(NSRunLoop *)runLoop forMode:(NSString *)mode
 {
-#if USE(CFNETWORK)
-    CFRunLoopRef schedulePairRunLoop = [runLoop getCFRunLoop];
-#else
-    NSRunLoop *schedulePairRunLoop = runLoop;
-#endif
     if (runLoop && mode)
-        core(self)->removeSchedulePair(SchedulePair::create(schedulePairRunLoop, (CFStringRef)mode));
+        core(self)->removeSchedulePair(SchedulePair::create(runLoop, (CFStringRef)mode));
 }
 
 static BOOL findString(NSView <WebDocumentSearching> *searchView, NSString *string, WebFindOptions options)
index b24c858..2f6de56 100644 (file)
@@ -1,3 +1,36 @@
+2016-10-11  Alex Christensen  <achristensen@webkit.org>
+
+        Remove dead networking code
+        https://bugs.webkit.org/show_bug.cgi?id=163263
+
+        Reviewed by Daniel Bates.
+
+        * DefaultDownloadDelegate.h:
+        * WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebFrameLoaderClient::savePlatformDataToCachedFrame):
+        * WebCoreSupport/WebFrameNetworkingContext.cpp:
+        (WebFrameNetworkingContext::ensurePrivateBrowsingSession):
+        * WebCoreSupport/WebFrameNetworkingContext.h:
+        * WebCoreSupport/WebPlatformStrategies.cpp:
+        * WebDownload.h:
+        * WebError.cpp:
+        (WebError::localizedDescription):
+        (WebError::sslPeerCertificate):
+        * WebError.h:
+        * WebMutableURLRequest.cpp:
+        (WebMutableURLRequest::mutableCopy):
+        * WebURLAuthenticationChallenge.cpp:
+        (WebURLAuthenticationChallenge::initWithProtectionSpace):
+        (WebURLAuthenticationChallenge::initWithAuthenticationChallenge):
+        * WebURLResponse.cpp:
+        (WebURLResponse::sslPeerCertificate):
+        * WebURLResponse.h:
+        * WebView.cpp:
+        (WebView::setCacheModel):
+        (WebView::canHandleRequest):
+        (WebView::notifyPreferencesChanged):
+        (updateSharedSettingsFromPreferencesIfNeeded):
+
 2016-10-11  Ryan Haddad  <ryanhaddad@apple.com>
 
         Unreviewed, rolling out r207067.
index 29713f0..729b6e6 100644 (file)
@@ -28,7 +28,7 @@
 #include "WebKit.h"
 #include <wtf/HashSet.h>
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 #include <CFNetwork/CFURLDownloadPriv.h>
 #endif
 
index 484ec35..2a35ecb 100644 (file)
@@ -974,7 +974,7 @@ void WebFrameLoaderClient::setTitle(const StringWithDirection& title, const URL&
 
 void WebFrameLoaderClient::savePlatformDataToCachedFrame(CachedFrame* cachedFrame)
 {
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
     Frame* coreFrame = core(m_webFrame);
     if (!coreFrame)
         return;
index 98fafd9..0903b86 100644 (file)
@@ -34,7 +34,7 @@
 #include <WebCore/Settings.h>
 #include <wtf/NeverDestroyed.h>
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 #include <CFNetwork/CFHTTPCookiesPriv.h>
 #include <WebKitSystemInterface/WebKitSystemInterface.h>
 #endif
@@ -47,7 +47,7 @@ static String& identifierBase()
     return base;
 }
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 void WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts(WebKitCookieStorageAcceptPolicy policy)
 {
     if (RetainPtr<CFHTTPCookieStorageRef> cookieStorage = NetworkStorageSession::defaultStorageSession().cookieStorage())
@@ -67,7 +67,7 @@ void WebFrameNetworkingContext::setPrivateBrowsingStorageSessionIdentifierBase(c
 
 NetworkStorageSession& WebFrameNetworkingContext::ensurePrivateBrowsingSession()
 {
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
     ASSERT(isMainThread());
 
     if (auto privateSession = NetworkStorageSession::storageSession(SessionID::legacyPrivateSessionID()))
index 59fe4e9..eac3072 100644 (file)
@@ -22,8 +22,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
-#ifndef WebFrameNetworkingContext_h
-#define WebFrameNetworkingContext_h
+#pragma once
 
 #include <WebCore/FrameNetworkingContext.h>
 
@@ -34,7 +33,7 @@ public:
         return adoptRef(new WebFrameNetworkingContext(frame));
     }
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
     static void setCookieAcceptPolicyForAllContexts(WebKitCookieStorageAcceptPolicy);
 #endif
     static void setPrivateBrowsingStorageSessionIdentifierBase(const String&);
@@ -50,5 +49,3 @@ private:
     WebCore::ResourceError blockedError(const WebCore::ResourceRequest&) const override;
     WebCore::NetworkStorageSession& storageSession() const override;
 };
-
-#endif
index 74d095c..d8b1d48 100644 (file)
@@ -33,7 +33,7 @@
 #include <WebCore/Page.h>
 #include <WebCore/PageGroup.h>
 #include <WebCore/PlatformCookieJar.h>
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 #include <WebKitSystemInterface/WebKitSystemInterface.h>
 #endif
 
index 026c626..2117e78 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef WebDownload_h
-#define WebDownload_h
+#pragma once
 
 #include "WebKit.h"
 #include <WebCore/COMPtr.h>
 #include <wtf/RetainPtr.h>
 #include <wtf/text/WTFString.h>
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 #include <CFNetwork/CFURLDownloadPriv.h>
 #elif USE(CURL)
 #include <WebCore/CurlDownload.h>
@@ -84,7 +83,7 @@ public:
     virtual HRESULT STDMETHODCALLTYPE continueWithoutCredentialForAuthenticationChallenge(_In_opt_ IWebURLAuthenticationChallenge*);
     virtual HRESULT STDMETHODCALLTYPE useCredential(_In_opt_ IWebURLCredential*, _In_opt_ IWebURLAuthenticationChallenge*);
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
     // CFURLDownload Callbacks
     void didStart();
     CFURLRequestRef willSendRequest(CFURLRequestRef, CFURLResponseRef);
@@ -109,7 +108,7 @@ protected:
 
     WTF::String m_destination;
     WTF::String m_bundlePath;
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
     RetainPtr<CFURLDownloadRef> m_download;
 #elif USE(CURL)
     RefPtr<WebCore::CurlDownload> m_download;
@@ -123,6 +122,3 @@ protected:
     int m_received;
 #endif
 };
-
-
-#endif
index 170c6c8..3107573 100644 (file)
@@ -33,7 +33,7 @@
 #include <CoreGraphics/CoreGraphics.h>
 #endif
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 #include <WebKitSystemInterface/WebKitSystemInterface.h>
 #endif
 
@@ -135,7 +135,7 @@ HRESULT WebError::localizedDescription(__deref_opt_out BSTR* result)
 
     *result = BString(m_error.localizedDescription()).release();
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
     if (!*result) {
         if (int code = m_error.errorCode())
             *result = BString(wkCFNetworkErrorGetLocalizedDescription(code)).release();
@@ -219,7 +219,7 @@ HRESULT WebError::sslPeerCertificate(_Out_ ULONG_PTR* result)
         return E_POINTER;
     *result = 0;
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
     if (!m_cfErrorUserInfoDict) {
         // copy userinfo from CFErrorRef
         CFErrorRef cfError = m_error;
index 101c846..21f449a 100644 (file)
@@ -23,8 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef WebError_h
-#define WebError_h
+#pragma once
 
 #include "WebKit.h"
 #include <WebCore/COMPtr.h>
@@ -66,10 +65,8 @@ public:
 private:
     ULONG m_refCount { 0 };
     COMPtr<IPropertyBag> m_userInfo;
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
     RetainPtr<CFDictionaryRef> m_cfErrorUserInfoDict;
 #endif
     WebCore::ResourceError m_error;
 };
-
-#endif
index 1a14a09..d5d62af 100644 (file)
@@ -40,7 +40,7 @@
 #include <WebCore/CertificateCFWin.h>
 #endif
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 #include <CFNetwork/CFURLRequestPriv.h>
 #endif
 
@@ -382,7 +382,7 @@ HRESULT WebMutableURLRequest::mutableCopy(_COM_Outptr_opt_ IWebMutableURLRequest
     if (!result)
         return E_POINTER;
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
     RetainPtr<CFMutableURLRequestRef> mutableRequest = adoptCF(CFURLRequestCreateMutableCopy(kCFAllocatorDefault, m_request.cfURLRequest(UpdateHTTPBody)));
     *result = createInstance(ResourceRequest(mutableRequest.get()));
     return S_OK;
index 149beb9..59788c4 100644 (file)
@@ -141,7 +141,7 @@ HRESULT WebURLAuthenticationChallenge::initWithProtectionSpace(_In_opt_ IWebURLP
 
     // FIXME: After we change AuthenticationChallenge to use "ResourceHandle" as the abstract "Sender" or "Source of this Auth Challenge", then we'll
     // construct the AuthenticationChallenge with that as obtained from the webSender
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
     m_authenticationChallenge = AuthenticationChallenge(webSpace->protectionSpace(), webCredential->credential(),
                                     previousFailureCount, webResponse->resourceResponse(), webError->resourceError());
 #endif
@@ -162,7 +162,7 @@ HRESULT WebURLAuthenticationChallenge::initWithAuthenticationChallenge(_In_opt_
     if (!webSender)
         return E_NOINTERFACE;
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
     m_authenticationChallenge = AuthenticationChallenge(webChallenge->authenticationChallenge().cfURLAuthChallengeRef(), webSender->authenticationClient());
 
     return S_OK;
index cc9e497..d80bf1d 100644 (file)
@@ -35,7 +35,7 @@
 #include <CoreGraphics/CoreGraphics.h>
 #endif
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 #include <WebKitSystemInterface/WebKitSystemInterface.h>
 #endif
 
@@ -406,7 +406,7 @@ HRESULT WebURLResponse::sslPeerCertificate(_Out_ ULONG_PTR* result)
         return E_POINTER;
     *result = 0;
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
     CFDictionaryRef dict = certificateDictionary();
     if (!dict)
         return E_FAIL;
@@ -475,7 +475,7 @@ const ResourceResponse& WebURLResponse::resourceResponse() const
     return m_response;
 }
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 CFDictionaryRef WebURLResponse::certificateDictionary() const
 {
     if (m_SSLCertificateInfo)
index e9cee95..0991792 100644 (file)
@@ -23,8 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef WebURLResponse_H
-#define WebURLResponse_H
+#pragma once
 
 #include "WebKit.h"
 #include <WebCore/ResourceResponse.h>
@@ -66,7 +65,7 @@ public:
 protected:
     HRESULT suggestedFileExtension(BSTR* result);
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
     CFDictionaryRef certificateDictionary() const;
 #endif
 
@@ -74,9 +73,7 @@ protected:
     ULONG m_refCount { 0 };
     WebCore::ResourceResponse m_response;
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
     mutable RetainPtr<CFDictionaryRef> m_SSLCertificateInfo;    // this ensures certificate contexts are valid for the lifetime of this WebURLResponse.
 #endif
 };
-
-#endif
index bb3a9a6..4c45688 100644 (file)
 #include <CoreFoundation/CoreFoundation.h>
 #endif
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 #include <CFNetwork/CFURLCachePriv.h>
 #include <CFNetwork/CFURLProtocolPriv.h>
 #include <WebKitSystemInterface/WebKitSystemInterface.h>
@@ -497,7 +497,7 @@ void WebView::setCacheModel(WebCacheModel cacheModel)
 
     String cacheDirectory;
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
     RetainPtr<CFURLCacheRef> cfurlCache = adoptCF(CFURLCacheCopySharedURLCache());
     RetainPtr<CFStringRef> cfurlCacheDirectory = adoptCF(wkCopyFoundationCacheDirectory(0));
     if (!cfurlCacheDirectory) {
@@ -551,7 +551,7 @@ void WebView::setCacheModel(WebCacheModel cacheModel)
         // Memory cache capacity (in bytes)
         cacheMemoryCapacity = 0;
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
         // Foundation disk cache capacity (in bytes)
         cacheDiskCapacity = CFURLCacheDiskCapacity(cfurlCache.get());
 #endif
@@ -675,7 +675,7 @@ void WebView::setCacheModel(WebCacheModel cacheModel)
     memoryCache.setDeadDecodedDataDeletionInterval(deadDecodedDataDeletionInterval);
     PageCache::singleton().setMaxSize(pageCacheSize);
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
     // Don't shrink a big disk cache, since that would cause churn.
     cacheDiskCapacity = max(cacheDiskCapacity, CFURLCacheDiskCapacity(cfurlCache.get()));
 
@@ -1547,7 +1547,7 @@ void WebView::closeWindow()
 
 bool WebView::canHandleRequest(const WebCore::ResourceRequest& request)
 {
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
     // On the Mac there's an about URL protocol implementation but Windows CFNetwork doesn't have that.
     if (request.url().protocolIs("about"))
         return true;
@@ -5261,7 +5261,7 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification)
     hr = preferences->privateBrowsingEnabled(&enabled);
     if (FAILED(hr))
         return hr;
-#if PLATFORM(WIN) || USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
     if (enabled)
         WebFrameNetworkingContext::ensurePrivateBrowsingSession();
     else
@@ -5560,7 +5560,7 @@ HRESULT updateSharedSettingsFromPreferencesIfNeeded(IWebPreferences* preferences
     if (FAILED(hr))
         return hr;
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
     WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts(acceptPolicy);
 #endif
 
index 12817a0..d77d125 100644 (file)
@@ -1,3 +1,31 @@
+2016-10-11  Alex Christensen  <achristensen@webkit.org>
+
+        Remove dead networking code
+        https://bugs.webkit.org/show_bug.cgi?id=163263
+
+        Reviewed by Daniel Bates.
+
+        * NetworkProcess/Downloads/Download.h:
+        * NetworkProcess/Downloads/ios/DownloadIOS.mm: Removed.
+        * NetworkProcess/Downloads/mac/DownloadMac.mm:
+        * NetworkProcess/NetworkLoad.h:
+        * NetworkProcess/mac/NetworkLoadMac.mm:
+        (WebKit::NetworkLoad::willCacheResponseAsync): Deleted.
+        * Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm:
+        (WebKit::AuthenticationManager::receivedCredential):
+        (WebKit::AuthenticationManager::receivedRequestToContinueWithoutCredential):
+        (WebKit::AuthenticationManager::receivedCancellation):
+        (WebKit::AuthenticationManager::receivedRequestToPerformDefaultHandling):
+        (WebKit::AuthenticationManager::receivedChallengeRejection):
+        * Shared/WebProcessCreationParameters.cpp:
+        (WebKit::WebProcessCreationParameters::encode):
+        (WebKit::WebProcessCreationParameters::decode):
+        * Shared/WebProcessCreationParameters.h:
+        * Shared/mac/WebCoreArgumentCodersMac.mm:
+        (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
+        (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
+        * WebKit2.xcodeproj/project.pbxproj:
+
 2016-10-11  Anders Carlsson  <andersca@apple.com>
 
         Move no longer used functions to WKDeprecatedFunctions.cpp
index 461d27b..7989f7e 100644 (file)
@@ -47,10 +47,6 @@ OBJC_CLASS WKDownloadAsDelegate;
 #endif
 #endif
 
-#if USE(CFNETWORK)
-#include <CFNetwork/CFURLDownloadPriv.h>
-#endif
-
 namespace IPC {
 class DataReference;
 }
@@ -139,9 +135,6 @@ private:
     RetainPtr<WKDownloadAsDelegate> m_delegate;
 #endif
 #endif
-#if USE(CFNETWORK)
-    RetainPtr<CFURLDownloadRef> m_download;
-#endif
     std::unique_ptr<WebCore::ResourceHandleClient> m_downloadClient;
     RefPtr<WebCore::ResourceHandle> m_resourceHandle;
     String m_suggestedName;
index 190c087..883a4b5 100644 (file)
@@ -26,7 +26,7 @@
 #import "config.h"
 #import "Download.h"
 
-#if !USE(CFNETWORK) && !USE(NETWORK_SESSION)
+#if !USE(NETWORK_SESSION)
 
 #import <WebCore/AuthenticationChallenge.h>
 #import <WebCore/AuthenticationMac.h>
@@ -272,4 +272,4 @@ static void dispatchOnMainThread(void (^block)())
 
 @end
 
-#endif // !USE(CFNETWORK) && !USE(NETWORK_SESSION)
+#endif // !USE(NETWORK_SESSION)
index acfd643..1dd5b39 100644 (file)
@@ -79,12 +79,8 @@ public:
     void didReceiveDataArray(WebCore::ResourceHandle*, CFArrayRef) override;
 #endif
 #if PLATFORM(COCOA)
-#if USE(CFNETWORK)
-    void willCacheResponseAsync(WebCore::ResourceHandle*, CFCachedURLResponseRef) override;
-#else
     void willCacheResponseAsync(WebCore::ResourceHandle*, NSCachedURLResponse *) override;
 #endif
-#endif
 
 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)
     void continueCanAuthenticateAgainstProtectionSpace(bool);
index 9e6ad2c..a6d6e15 100644 (file)
@@ -24,7 +24,6 @@
  */
 
 #import "config.h"
-
 #import "NetworkLoad.h"
 
 #import <WebCore/CFNetworkSPI.h>
@@ -34,17 +33,6 @@ namespace WebKit {
 
 using namespace WebCore;
 
-#if USE(CFNETWORK)
-
-void NetworkLoad::willCacheResponseAsync(ResourceHandle* handle, CFCachedURLResponseRef cfResponse)
-{
-    ASSERT_UNUSED(handle, handle == m_handle);
-
-    m_handle->continueWillCacheResponse(cfResponse);
-}
-
-#else
-
 void NetworkLoad::willCacheResponseAsync(ResourceHandle* handle, NSCachedURLResponse *nsResponse)
 {
     ASSERT_UNUSED(handle, handle == m_handle);
@@ -52,6 +40,4 @@ void NetworkLoad::willCacheResponseAsync(ResourceHandle* handle, NSCachedURLResp
     m_handle->continueWillCacheResponse(nsResponse);
 }
 
-#endif // !USE(CFNETWORK)
-
 } // namespace WebKit
index 00f24a9..eed0539 100644 (file)
@@ -32,37 +32,27 @@ namespace WebKit {
 
 void AuthenticationManager::receivedCredential(const AuthenticationChallenge& authenticationChallenge, const Credential& credential)
 {
-#if !USE(CFNETWORK)
     [authenticationChallenge.sender() useCredential:credential.nsCredential() forAuthenticationChallenge:authenticationChallenge.nsURLAuthenticationChallenge()];
-#endif
 }
 
 void AuthenticationManager::receivedRequestToContinueWithoutCredential(const AuthenticationChallenge& authenticationChallenge)
 {
-#if !USE(CFNETWORK)
     [authenticationChallenge.sender() continueWithoutCredentialForAuthenticationChallenge:authenticationChallenge.nsURLAuthenticationChallenge()];
-#endif
 }
 
 void AuthenticationManager::receivedCancellation(const AuthenticationChallenge& authenticationChallenge)
 {
-#if !USE(CFNETWORK)
     [authenticationChallenge.sender() cancelAuthenticationChallenge:authenticationChallenge.nsURLAuthenticationChallenge()];
-#endif
 }
 
 void AuthenticationManager::receivedRequestToPerformDefaultHandling(const AuthenticationChallenge& authenticationChallenge)
 {
-#if !USE(CFNETWORK)
     [authenticationChallenge.sender() performDefaultHandlingForAuthenticationChallenge:authenticationChallenge.nsURLAuthenticationChallenge()];
-#endif
 }
 
 void AuthenticationManager::receivedChallengeRejection(const AuthenticationChallenge& authenticationChallenge)
 {
-#if !USE(CFNETWORK)
     [authenticationChallenge.sender() rejectProtectionSpaceAndContinueWithChallenge:authenticationChallenge.nsURLAuthenticationChallenge()];
-#endif
 }
 
 }
index a755260..0b85213 100644 (file)
@@ -104,7 +104,7 @@ void WebProcessCreationParameters::encode(IPC::Encoder& encoder) const
     encoder << textCheckerState;
     encoder << fullKeyboardAccessEnabled;
     encoder << defaultRequestTimeoutInterval;
-#if PLATFORM(COCOA) || USE(CFNETWORK)
+#if PLATFORM(COCOA)
     encoder << uiProcessBundleIdentifier;
 #endif
 #if PLATFORM(COCOA)
@@ -240,7 +240,7 @@ bool WebProcessCreationParameters::decode(IPC::Decoder& decoder, WebProcessCreat
         return false;
     if (!decoder.decode(parameters.defaultRequestTimeoutInterval))
         return false;
-#if PLATFORM(COCOA) || USE(CFNETWORK)
+#if PLATFORM(COCOA)
     if (!decoder.decode(parameters.uiProcessBundleIdentifier))
         return false;
 #endif
index bdf4631..3c7918c 100644 (file)
@@ -123,7 +123,7 @@ struct WebProcessCreationParameters {
 
     double defaultRequestTimeoutInterval;
 
-#if PLATFORM(COCOA) || USE(CFNETWORK)
+#if PLATFORM(COCOA)
     String uiProcessBundleIdentifier;
 #endif
 
index 4dcb82f..69e7a6f 100644 (file)
 #import <WebCore/ResourceError.h>
 #import <WebCore/ResourceRequest.h>
 
-#if USE(CFNETWORK)
-#import <CFNetwork/CFURLRequest.h>
-#endif
-
 #if ENABLE(WIRELESS_PLAYBACK_TARGET)
 #import <WebCore/AVFoundationSPI.h>
 #import <WebCore/MediaPlaybackTargetContext.h>
@@ -57,36 +53,6 @@ using namespace WebCore;
 
 namespace IPC {
 
-#if USE(CFNETWORK)
-void ArgumentCoder<ResourceRequest>::encodePlatformData(Encoder& encoder, const ResourceRequest& resourceRequest)
-{
-    RetainPtr<CFURLRequestRef> requestToSerialize = resourceRequest.cfURLRequest(DoNotUpdateHTTPBody);
-
-    bool requestIsPresent = requestToSerialize;
-    encoder << requestIsPresent;
-
-    if (!requestIsPresent)
-        return;
-
-    // We don't send HTTP body over IPC for better performance.
-    // Also, it's not always possible to do, as streams can only be created in process that does networking.
-    RetainPtr<CFDataRef> requestHTTPBody = adoptCF(CFURLRequestCopyHTTPRequestBody(requestToSerialize.get()));
-    RetainPtr<CFReadStreamRef> requestHTTPBodyStream = adoptCF(CFURLRequestCopyHTTPRequestBodyStream(requestToSerialize.get()));
-    if (requestHTTPBody || requestHTTPBodyStream) {
-        CFMutableURLRequestRef mutableRequest = CFURLRequestCreateMutableCopy(0, requestToSerialize.get());
-        requestToSerialize = adoptCF(mutableRequest);
-        CFURLRequestSetHTTPRequestBody(mutableRequest, nil);
-        CFURLRequestSetHTTPRequestBodyStream(mutableRequest, nil);
-    }
-
-    RetainPtr<CFDictionaryRef> dictionary = adoptCF(WKCFURLRequestCreateSerializableRepresentation(requestToSerialize.get(), IPC::tokenNullTypeRef()));
-    IPC::encode(encoder, dictionary.get());
-
-    // The fallback array is part of CFURLRequest, but it is not encoded by WKCFURLRequestCreateSerializableRepresentation.
-    encoder << resourceRequest.responseContentDispositionEncodingFallbackArray();
-    encoder.encodeEnum(resourceRequest.requester());
-}
-#else
 void ArgumentCoder<ResourceRequest>::encodePlatformData(Encoder& encoder, const ResourceRequest& resourceRequest)
 {
     RetainPtr<NSURLRequest> requestToSerialize = resourceRequest.nsURLRequest(DoNotUpdateHTTPBody);
@@ -112,7 +78,6 @@ void ArgumentCoder<ResourceRequest>::encodePlatformData(Encoder& encoder, const
     encoder << resourceRequest.responseContentDispositionEncodingFallbackArray();
     encoder.encodeEnum(resourceRequest.requester());
 }
-#endif
 
 bool ArgumentCoder<ResourceRequest>::decodePlatformData(Decoder& decoder, ResourceRequest& resourceRequest)
 {
@@ -129,19 +94,11 @@ bool ArgumentCoder<ResourceRequest>::decodePlatformData(Decoder& decoder, Resour
     if (!IPC::decode(decoder, dictionary))
         return false;
 
-#if USE(CFNETWORK)
-    RetainPtr<CFURLRequestRef> cfURLRequest = adoptCF(WKCreateCFURLRequestFromSerializableRepresentation(dictionary.get(), IPC::tokenNullTypeRef()));
-    if (!cfURLRequest)
-        return false;
-
-    resourceRequest = ResourceRequest(cfURLRequest.get());
-#else
     RetainPtr<NSURLRequest> nsURLRequest = WKNSURLRequestFromSerializableRepresentation(dictionary.get(), IPC::tokenNullTypeRef());
     if (!nsURLRequest)
         return false;
 
     resourceRequest = ResourceRequest(nsURLRequest.get());
-#endif
     
     Vector<String> responseContentDispositionEncodingFallbackArray;
     if (!decoder.decode(responseContentDispositionEncodingFallbackArray))
index e6c5740..939dde9 100644 (file)
                5C1427051C23F84C00D41183 /* DownloadID.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C1426F71C23F84300D41183 /* DownloadID.h */; };
                5C1427061C23F84C00D41183 /* DownloadManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C1426F81C23F84300D41183 /* DownloadManager.cpp */; };
                5C1427071C23F84C00D41183 /* DownloadManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C1426F91C23F84300D41183 /* DownloadManager.h */; };
-               5C1427111C23F89E00D41183 /* DownloadIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C14270D1C23F88500D41183 /* DownloadIOS.mm */; };
                5C1427121C23F89E00D41183 /* DownloadMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C14270F1C23F89900D41183 /* DownloadMac.mm */; };
                5C1427131C23F89E00D41183 /* DownloadCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C1427091C23F86900D41183 /* DownloadCocoa.mm */; };
                5C1427181C23F8B700D41183 /* CustomProtocolManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C1427141C23F8B000D41183 /* CustomProtocolManager.h */; };
                5C1426F81C23F84300D41183 /* DownloadManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DownloadManager.cpp; path = NetworkProcess/Downloads/DownloadManager.cpp; sourceTree = "<group>"; };
                5C1426F91C23F84300D41183 /* DownloadManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DownloadManager.h; path = NetworkProcess/Downloads/DownloadManager.h; sourceTree = "<group>"; };
                5C1427091C23F86900D41183 /* DownloadCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = DownloadCocoa.mm; path = NetworkProcess/Downloads/cocoa/DownloadCocoa.mm; sourceTree = "<group>"; };
-               5C14270D1C23F88500D41183 /* DownloadIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = DownloadIOS.mm; path = NetworkProcess/Downloads/ios/DownloadIOS.mm; sourceTree = "<group>"; };
                5C14270F1C23F89900D41183 /* DownloadMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = DownloadMac.mm; path = NetworkProcess/Downloads/mac/DownloadMac.mm; sourceTree = "<group>"; };
                5C1427141C23F8B000D41183 /* CustomProtocolManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CustomProtocolManager.h; path = NetworkProcess/CustomProtocols/CustomProtocolManager.h; sourceTree = "<group>"; };
                5C1427151C23F8B000D41183 /* CustomProtocolManager.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CustomProtocolManager.messages.in; path = NetworkProcess/CustomProtocols/CustomProtocolManager.messages.in; sourceTree = "<group>"; };
                        isa = PBXGroup;
                        children = (
                                5C1427081C23F85200D41183 /* cocoa */,
-                               5C14270C1C23F87700D41183 /* ios */,
                                5C14270B1C23F87100D41183 /* mac */,
                                83BFAC401D96136000433490 /* BlobDownloadClient.h */,
                                83BFAC411D96136000433490 /* BlobDownloadClient.cpp */,
                        name = mac;
                        sourceTree = "<group>";
                };
-               5C14270C1C23F87700D41183 /* ios */ = {
-                       isa = PBXGroup;
-                       children = (
-                               5C14270D1C23F88500D41183 /* DownloadIOS.mm */,
-                       );
-                       name = ios;
-                       sourceTree = "<group>";
-               };
                5C14271A1C23F8BF00D41183 /* Cocoa */ = {
                        isa = PBXGroup;
                        children = (
                                5C1427011C23F84C00D41183 /* Download.cpp in Sources */,
                                A1DF631218E0B7C8003A3E2A /* DownloadClient.mm in Sources */,
                                5C1427131C23F89E00D41183 /* DownloadCocoa.mm in Sources */,
-                               5C1427111C23F89E00D41183 /* DownloadIOS.mm in Sources */,
                                5C1427121C23F89E00D41183 /* DownloadMac.mm in Sources */,
                                5C1427061C23F84C00D41183 /* DownloadManager.cpp in Sources */,
                                1AB7D4CB1288AAA700CFD08C /* DownloadProxy.cpp in Sources */,
index 5fb1df2..dfa3bb2 100644 (file)
@@ -2,7 +2,7 @@ include(OptionsWin)
 
 set(USE_CG 1)
 set(USE_CA 1)
-set(USE_CFNETWORK 1)
+set(USE_CFURLCONNECTION 1)
 set(USE_ICU_UNICODE 1)
 
 # Uncomment the following line to try the Direct2D backend.
index f671270..5ff4ebc 100644 (file)
@@ -1,3 +1,15 @@
+2016-10-11  Alex Christensen  <achristensen@webkit.org>
+
+        Remove dead networking code
+        https://bugs.webkit.org/show_bug.cgi?id=163263
+
+        Reviewed by Daniel Bates.
+
+        * DumpRenderTree/DumpRenderTree.h:
+        * DumpRenderTree/config.h:
+        * DumpRenderTree/win/DumpRenderTree.cpp:
+        (main):
+
 2016-10-11  John Wilander  <wilander@apple.com>
 
         Modify check-webkit-style to prohibit sensitive phrases
index 2a2ea14..304232b 100644 (file)
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef DumpRenderTree_h
-#define DumpRenderTree_h
-
-// FIXME: Remove this when all platforms are using config.h
-#ifndef Config_H
-#include <wtf/Platform.h>
-#endif
+#pragma once
 
 #if PLATFORM(COCOA)
 #include "DumpRenderTreeMac.h"
@@ -45,6 +39,7 @@
 #endif
 
 #include <string>
+#include <wtf/Platform.h>
 #include <wtf/RefPtr.h>
 
 #if !OS(OPENBSD)
@@ -71,5 +66,3 @@ struct TestCommand {
 };
 
 TestCommand parseInputLine(const std::string&);
-
-#endif // DumpRenderTree_h
index 9e0fe4f..3ee18a3 100644 (file)
@@ -18,7 +18,7 @@
  *
  */
 
-#define Config_H
+#pragma once
 
 #if defined(HAVE_CONFIG_H) && HAVE_CONFIG_H && defined(BUILDING_WITH_CMAKE)
 #include "cmakeconfig.h"
@@ -44,7 +44,7 @@
 #define USE_CURL 1
 #else
 #define USE_CG 1
-#define USE_CFNETWORK 1
+#define USE_CFURLCONNECTION 1
 #endif
 
 #undef _WIN32_WINNT
index bdddbb4..a764c74 100644 (file)
@@ -61,7 +61,7 @@
 #include <WebKit/WebKit.h>
 #include <WebKit/WebKitCOMAPI.h>
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 #include <CFNetwork/CFHTTPCookiesPriv.h>
 #include <CFNetwork/CFURLCachePriv.h>
 #endif
@@ -1287,7 +1287,7 @@ IWebView* createWebViewAndOffscreenWindow(HWND* webViewWindow)
     return webView;
 }
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 RetainPtr<CFURLCacheRef> sharedCFURLCache()
 {
 #ifndef DEBUG_ALL
@@ -1465,7 +1465,7 @@ int main(int argc, const char* argv[])
     if (FAILED(webView->mainFrame(&frame)))
         return -7;
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
     RetainPtr<CFURLCacheRef> urlCache = sharedCFURLCache();
     CFURLCacheRemoveAllCachedResponses(urlCache.get());
 #endif