Modified: trunk/Source/WebCore/ChangeLog (264807 => 264808)
--- trunk/Source/WebCore/ChangeLog 2020-07-24 00:50:29 UTC (rev 264807)
+++ trunk/Source/WebCore/ChangeLog 2020-07-24 02:28:04 UTC (rev 264808)
@@ -1,3 +1,21 @@
+2020-07-23 Alex Christensen <achristen...@webkit.org>
+
+ Remove dead code in ResourceHandleCFNet.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=214717
+
+ Reviewed by Darin Adler.
+
+ ResourceHandleCFNet.cpp is not compiled on Cocoa platforms any more.
+ Remove Cocoa-specific code in that file, which was used on iOS before adopting NSURLSession.
+
+ * platform/network/cf/ResourceHandleCFNet.cpp:
+ (WebCore::ResourceHandle::createCFURLConnection):
+ (WebCore::ResourceHandle::start):
+ (WebCore::ResourceHandle::tryHandlePasswordBasedAuthentication):
+ (WebCore::ResourceHandle::receivedCredential):
+ (WebCore::ResourceHandle::schedule): Deleted.
+ (WebCore::ResourceHandle::unschedule): Deleted.
+
2020-07-23 James Darpinian <jdarpin...@chromium.org>
[WebGL2] Query Objects
Modified: trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp (264807 => 264808)
--- trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp 2020-07-24 00:50:29 UTC (rev 264807)
+++ trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp 2020-07-24 02:28:04 UTC (rev 264808)
@@ -212,12 +212,6 @@
CFDictionarySetValue(streamProperties, CFSTR("_kCFURLConnectionSessionID"), CFSTR("WebKitPrivateSession"));
}
-#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)
@@ -263,10 +257,6 @@
bool shouldUseCredentialStorage = !client() || client()->shouldUseCredentialStorage(this);
-#if PLATFORM(COCOA) && !HAVE(TIMINGDATAOPTIONS)
- setCollectsTimingData();
-#endif
-
createCFURLConnection(shouldUseCredentialStorage, d->m_shouldContentSniff, d->m_shouldContentEncodingSniff, nullptr, client()->connectionProperties(this).get());
ref();
@@ -371,11 +361,7 @@
if (!d->m_user.isNull() && !d->m_password.isNull()) {
auto cfCredential = adoptCF(CFURLCredentialCreate(kCFAllocatorDefault, d->m_user.createCFString().get(), d->m_password.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)
@@ -405,12 +391,8 @@
// Store the credential back, possibly adding it as a default for this directory.
d->m_context->storageSession()->credentialStorage().set(partition, 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;
}
}
@@ -456,20 +438,12 @@
d->m_context->storageSession()->credentialStorage().set(firstRequest().cachePartition(), 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();
@@ -637,30 +611,6 @@
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;