Remove Cocoa CFURLConnection loading code
[WebKit-https.git] / Source / WebCore / platform / network / cf / ResourceResponseCFNet.cpp
index 7cdacaf..7f86ab0 100644 (file)
 
 #if USE(CFURLCONNECTION)
 
-#include "CFNetworkSPI.h"
+#include <pal/spi/cf/CFNetworkSPI.h>
 
 #include "HTTPParsers.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
 {