<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[210890] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/210890">210890</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2017-01-18 14:52:17 -0800 (Wed, 18 Jan 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Fix CFURLConnection build on Mac
https://bugs.webkit.org/show_bug.cgi?id=167168

Patch by Alex Christensen &lt;achristensen@webkit.org&gt; on 2017-01-18
Reviewed by Andy Estes.

Source/WebCore:

This is old code, and it hurts to do this, but I need this working to compare with Windows
to get the ResourceHandleCFURLConnectionDelegateWithOperationQueue working so we can make
loading asynchronous in WebCore.

* page/mac/PageMac.mm:
(WebCore::Page::platformInitialize):
* platform/network/cf/AuthenticationCF.cpp:
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::createCFURLConnection):
* platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::setupRequest):
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::canRespondToProtectionSpace):
* platform/network/cocoa/ResourceRequestCocoa.mm:
(WebCore::ResourceRequest::clearOrUpdateNSURLRequest):
Moved from iOS-specific file.  It's needed on Mac using CFURLConnection, too.
* platform/network/ios/ResourceRequestIOS.mm:
(WebCore::ResourceRequest::clearOrUpdateNSURLRequest): Deleted.

Source/WebKit2:

* NetworkProcess/Downloads/mac/DownloadMac.mm:
(WebKit::Download::resume):
(WebKit::Download::platformDidFinish):
(WebKit::Download::platformCancelNetworkLoad):
(WebKit::Download::startNetworkLoadWithHandle):
(WebKit::Download::startNetworkLoad):
(WebKit::Download::platformInvalidate):
* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTaskCocoa::allowsSpecificHTTPSCertificateForHost):
(WebKit::serverTrustCredential):
* Shared/Authentication/mac/AuthenticationManager.mac.mm:
(WebKit::AuthenticationManager::tryUseCertificateInfoForChallenge):
* config.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorepagemacPageMacmm">trunk/Source/WebCore/page/mac/PageMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfAuthenticationCFcpp">trunk/Source/WebCore/platform/network/cf/AuthenticationCF.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfResourceHandleCFNetcpp">trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfSynchronousResourceHandleCFURLConnectionDelegatecpp">trunk/Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcocoaResourceRequestCocoamm">trunk/Source/WebCore/platform/network/cocoa/ResourceRequestCocoa.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkiosResourceRequestIOSmm">trunk/Source/WebCore/platform/network/ios/ResourceRequestIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessDownloadsmacDownloadMacmm">trunk/Source/WebKit2/NetworkProcess/Downloads/mac/DownloadMac.mm</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcesscocoaNetworkDataTaskCocoamm">trunk/Source/WebKit2/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm</a></li>
<li><a href="#trunkSourceWebKit2SharedAuthenticationmacAuthenticationManagermacmm">trunk/Source/WebKit2/Shared/Authentication/mac/AuthenticationManager.mac.mm</a></li>
<li><a href="#trunkSourceWebKit2configh">trunk/Source/WebKit2/config.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (210889 => 210890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-01-18 22:48:07 UTC (rev 210889)
+++ trunk/Source/WebCore/ChangeLog        2017-01-18 22:52:17 UTC (rev 210890)
</span><span class="lines">@@ -1,3 +1,28 @@
</span><ins>+2017-01-18  Alex Christensen  &lt;achristensen@webkit.org&gt;
+
+        Fix CFURLConnection build on Mac
+        https://bugs.webkit.org/show_bug.cgi?id=167168
+
+        Reviewed by Andy Estes.
+
+        This is old code, and it hurts to do this, but I need this working to compare with Windows
+        to get the ResourceHandleCFURLConnectionDelegateWithOperationQueue working so we can make
+        loading asynchronous in WebCore.
+
+        * page/mac/PageMac.mm:
+        (WebCore::Page::platformInitialize):
+        * platform/network/cf/AuthenticationCF.cpp:
+        * platform/network/cf/ResourceHandleCFNet.cpp:
+        (WebCore::ResourceHandle::createCFURLConnection):
+        * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
+        (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::setupRequest):
+        (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::canRespondToProtectionSpace):
+        * platform/network/cocoa/ResourceRequestCocoa.mm:
+        (WebCore::ResourceRequest::clearOrUpdateNSURLRequest):
+        Moved from iOS-specific file.  It's needed on Mac using CFURLConnection, too.
+        * platform/network/ios/ResourceRequestIOS.mm:
+        (WebCore::ResourceRequest::clearOrUpdateNSURLRequest): Deleted.
+
</ins><span class="cx"> 2017-01-18  Michael Catanzaro  &lt;mcatanzaro@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION(r210531): Broke local resource loads from custom local protocols
</span></span></pre></div>
<a id="trunkSourceWebCorepagemacPageMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/mac/PageMac.mm (210889 => 210890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/mac/PageMac.mm        2017-01-18 22:48:07 UTC (rev 210889)
+++ trunk/Source/WebCore/page/mac/PageMac.mm        2017-01-18 22:52:17 UTC (rev 210890)
</span><span class="lines">@@ -51,8 +51,12 @@
</span><span class="cx">     addSchedulePair(SchedulePair::create(WebThreadNSRunLoop(), kCFRunLoopCommonModes));
</span><span class="cx"> #endif // USE(CFURLCONNECTION)
</span><span class="cx"> #else
</span><ins>+#if USE(CFURLCONNECTION)
+    addSchedulePair(SchedulePair::create([[NSRunLoop currentRunLoop] getCFRunLoop], kCFRunLoopCommonModes));
+#else
</ins><span class="cx">     addSchedulePair(SchedulePair::create([NSRunLoop currentRunLoop], kCFRunLoopCommonModes));
</span><span class="cx"> #endif
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(TREE_DEBUGGING)
</span><span class="cx">     static std::once_flag onceFlag;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfAuthenticationCFcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/AuthenticationCF.cpp (210889 => 210890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/AuthenticationCF.cpp        2017-01-18 22:48:07 UTC (rev 210889)
+++ trunk/Source/WebCore/platform/network/cf/AuthenticationCF.cpp        2017-01-18 22:52:17 UTC (rev 210890)
</span><span class="lines">@@ -93,6 +93,7 @@
</span><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(COCOA)
</ins><span class="cx"> CFURLCredentialRef createCF(const Credential&amp; coreCredential)
</span><span class="cx"> {
</span><span class="cx">     CFURLCredentialPersistence persistence = kCFURLCredentialPersistenceNone;
</span><span class="lines">@@ -274,6 +275,7 @@
</span><span class="cx">                            CFURLProtectionSpaceGetRealm(cfSpace),
</span><span class="cx">                            scheme);
</span><span class="cx"> }
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfResourceHandleCFNetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp (210889 => 210890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp        2017-01-18 22:48:07 UTC (rev 210889)
+++ trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp        2017-01-18 22:52:17 UTC (rev 210890)
</span><span class="lines">@@ -171,9 +171,12 @@
</span><span class="cx"> #else
</span><span class="cx">     if (allowsAnyHTTPSCertificateHosts().contains(firstRequest().url().host())) {
</span><span class="cx">         sslProps = adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &amp;kCFTypeDictionaryKeyCallBacks, &amp;kCFTypeDictionaryValueCallBacks));
</span><ins>+#pragma clang diagnostic push
+#pragma clang diagnostic ignored &quot;-Wdeprecated-declarations&quot;
</ins><span class="cx">         CFDictionaryAddValue(sslProps.get(), kCFStreamSSLAllowsAnyRoot, kCFBooleanTrue);
</span><span class="cx">         CFDictionaryAddValue(sslProps.get(), kCFStreamSSLAllowsExpiredRoots, kCFBooleanTrue);
</span><span class="cx">         CFDictionaryAddValue(sslProps.get(), kCFStreamSSLAllowsExpiredCertificates, kCFBooleanTrue);
</span><ins>+#pragma clang diagnostic pop
</ins><span class="cx">         CFDictionaryAddValue(sslProps.get(), kCFStreamSSLValidatesCertificateChain, kCFBooleanFalse);
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfSynchronousResourceHandleCFURLConnectionDelegatecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp (210889 => 210890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp        2017-01-18 22:48:07 UTC (rev 210889)
+++ trunk/Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp        2017-01-18 22:52:17 UTC (rev 210890)
</span><span class="lines">@@ -65,6 +65,8 @@
</span><span class="cx"> {
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     CFURLRequestSetShouldStartSynchronously(request, 1);
</span><ins>+#else
+    UNUSED_PARAM(request);
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -259,13 +261,13 @@
</span><span class="cx"> 
</span><span class="cx">     LOG(Network, &quot;CFNet - SynchronousResourceHandleCFURLConnectionDelegate::canRespondToProtectionSpace(handle=%p (%s)&quot;, m_handle, m_handle-&gt;firstRequest().url().string().utf8().data());
</span><span class="cx"> 
</span><ins>+    ProtectionSpace coreProtectionSpace = ProtectionSpace(protectionSpace);
</ins><span class="cx"> #if PLATFORM(IOS)
</span><del>-    ProtectionSpace coreProtectionSpace = ProtectionSpace(protectionSpace);
</del><span class="cx">     if (coreProtectionSpace.authenticationScheme() == ProtectionSpaceAuthenticationSchemeUnknown)
</span><span class="cx">         return false;
</span><span class="cx">     return m_handle-&gt;canAuthenticateAgainstProtectionSpace(coreProtectionSpace);
</span><span class="cx"> #else
</span><del>-    return m_handle-&gt;canAuthenticateAgainstProtectionSpace(core(protectionSpace));
</del><ins>+    return m_handle-&gt;canAuthenticateAgainstProtectionSpace(coreProtectionSpace);
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> #endif // USE(PROTECTION_SPACE_AUTH_CALLBACK)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcocoaResourceRequestCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cocoa/ResourceRequestCocoa.mm (210889 => 210890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cocoa/ResourceRequestCocoa.mm        2017-01-18 22:48:07 UTC (rev 210889)
+++ trunk/Source/WebCore/platform/network/cocoa/ResourceRequestCocoa.mm        2017-01-18 22:52:17 UTC (rev 210890)
</span><span class="lines">@@ -61,8 +61,30 @@
</span><span class="cx">     return [[m_nsRequest.get() retain] autorelease];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if !USE(CFURLCONNECTION)
</del><ins>+#if USE(CFURLCONNECTION)
</ins><span class="cx"> 
</span><ins>+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 &lt;rdar://9843582&gt;.
+    // 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 &amp;&amp; requestClass != nsURLRequestClass &amp;&amp; requestClass != nsMutableURLRequestClass)
+        m_nsRequest = adoptNS([[requestClass alloc] _initWithCFURLRequest:m_cfRequest.get()]);
+    else
+        m_nsRequest = nullptr;
+}
+
+#else
+
</ins><span class="cx"> CFURLRequestRef ResourceRequest::cfURLRequest(HTTPBodyUpdatePolicy bodyPolicy) const
</span><span class="cx"> {
</span><span class="cx">     return [nsURLRequest(bodyPolicy) _CFURLRequest];
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkiosResourceRequestIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ios/ResourceRequestIOS.mm (210889 => 210890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ios/ResourceRequestIOS.mm        2017-01-18 22:48:07 UTC (rev 210889)
+++ trunk/Source/WebCore/platform/network/ios/ResourceRequestIOS.mm        2017-01-18 22:52:17 UTC (rev 210890)
</span><span class="lines">@@ -50,26 +50,6 @@
</span><span class="cx">         m_nsRequest = adoptNS([[NSMutableURLRequest alloc] _initWithCFURLRequest:m_cfRequest.get()]);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-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 &lt;rdar://9843582&gt;.
-    // 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 &amp;&amp; requestClass != nsURLRequestClass &amp;&amp; requestClass != nsMutableURLRequestClass)
-        m_nsRequest = adoptNS([[requestClass alloc] _initWithCFURLRequest:m_cfRequest.get()]);
-    else
-        m_nsRequest = nullptr;
-}
-
</del><span class="cx"> #endif // USE(CFURLCONNECTION)
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (210889 => 210890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2017-01-18 22:48:07 UTC (rev 210889)
+++ trunk/Source/WebKit2/ChangeLog        2017-01-18 22:52:17 UTC (rev 210890)
</span><span class="lines">@@ -1,5 +1,26 @@
</span><span class="cx"> 2017-01-18  Alex Christensen  &lt;achristensen@webkit.org&gt;
</span><span class="cx"> 
</span><ins>+        Fix CFURLConnection build on Mac
+        https://bugs.webkit.org/show_bug.cgi?id=167168
+
+        Reviewed by Andy Estes.
+
+        * NetworkProcess/Downloads/mac/DownloadMac.mm:
+        (WebKit::Download::resume):
+        (WebKit::Download::platformDidFinish):
+        (WebKit::Download::platformCancelNetworkLoad):
+        (WebKit::Download::startNetworkLoadWithHandle):
+        (WebKit::Download::startNetworkLoad):
+        (WebKit::Download::platformInvalidate):
+        * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
+        (WebKit::NetworkDataTaskCocoa::allowsSpecificHTTPSCertificateForHost):
+        (WebKit::serverTrustCredential):
+        * Shared/Authentication/mac/AuthenticationManager.mac.mm:
+        (WebKit::AuthenticationManager::tryUseCertificateInfoForChallenge):
+        * config.h:
+
+2017-01-18  Alex Christensen  &lt;achristensen@webkit.org&gt;
+
</ins><span class="cx">         Modernize DelayedReply IPC code
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=167176
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessDownloadsmacDownloadMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/Downloads/mac/DownloadMac.mm (210889 => 210890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/Downloads/mac/DownloadMac.mm        2017-01-18 22:48:07 UTC (rev 210889)
+++ trunk/Source/WebKit2/NetworkProcess/Downloads/mac/DownloadMac.mm        2017-01-18 22:52:17 UTC (rev 210890)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx"> #import &quot;config.h&quot;
</span><span class="cx"> #import &quot;Download.h&quot;
</span><span class="cx"> 
</span><del>-#if !USE(CFURLCONNECTION) &amp;&amp; !USE(NETWORK_SESSION)
</del><ins>+#if !USE(NETWORK_SESSION)
</ins><span class="cx"> 
</span><span class="cx"> #import &lt;WebCore/AuthenticationChallenge.h&gt;
</span><span class="cx"> #import &lt;WebCore/AuthenticationMac.h&gt;
</span><span class="lines">@@ -38,6 +38,44 @@
</span><span class="cx"> #import &quot;DataReference.h&quot;
</span><span class="cx"> #import &quot;WebPage.h&quot;
</span><span class="cx"> 
</span><ins>+#if USE(CFURLCONNECTION)
+
+namespace WebKit {
+
+void Download::resume(const IPC::DataReference&amp;, const String&amp;, const SandboxExtension::Handle&amp;)
+{
+    notImplemented();
+}
+
+void Download::platformDidFinish()
+{
+    notImplemented();
+}
+
+void Download::platformCancelNetworkLoad()
+{
+    notImplemented();
+}
+
+void Download::startNetworkLoadWithHandle(WebCore::ResourceHandle*, const WebCore::ResourceResponse&amp;)
+{
+    notImplemented();
+}
+
+void Download::startNetworkLoad()
+{
+    notImplemented();
+}
+
+void Download::platformInvalidate()
+{
+    notImplemented();
+}
+
+}
+
+#else
+
</ins><span class="cx"> @interface WKDownloadAsDelegate : NSObject &lt;NSURLDownloadDelegate&gt; {
</span><span class="cx">     WebKit::Download* _download;
</span><span class="cx"> }
</span><span class="lines">@@ -272,4 +310,5 @@
</span><span class="cx"> 
</span><span class="cx"> @end
</span><span class="cx"> 
</span><del>-#endif // !USE(CFURLCONNECTION) &amp;&amp; !USE(NETWORK_SESSION)
</del><ins>+#endif // USE(CFURLCONNECTION)
+#endif // !USE(NETWORK_SESSION)
</ins></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcesscocoaNetworkDataTaskCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm (210889 => 210890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm        2017-01-18 22:48:07 UTC (rev 210889)
+++ trunk/Source/WebKit2/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm        2017-01-18 22:52:17 UTC (rev 210890)
</span><span class="lines">@@ -40,6 +40,7 @@
</span><span class="cx"> #import &lt;WebCore/CFNetworkSPI.h&gt;
</span><span class="cx"> #import &lt;WebCore/FileSystem.h&gt;
</span><span class="cx"> #import &lt;WebCore/NetworkStorageSession.h&gt;
</span><ins>+#import &lt;WebCore/NotImplemented.h&gt;
</ins><span class="cx"> #import &lt;WebCore/ResourceRequest.h&gt;
</span><span class="cx"> #import &lt;wtf/MainThread.h&gt;
</span><span class="cx"> #import &lt;wtf/text/Base64.h&gt;
</span><span class="lines">@@ -278,6 +279,7 @@
</span><span class="cx">     download.setSandboxExtension(WTFMove(m_sandboxExtension));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if !USE(CFURLCONNECTION)
</ins><span class="cx"> static bool certificatesMatch(SecTrustRef trust1, SecTrustRef trust2)
</span><span class="cx"> {
</span><span class="cx">     if (!trust1 || !trust2)
</span><span class="lines">@@ -299,6 +301,7 @@
</span><span class="cx"> 
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx"> bool NetworkDataTaskCocoa::allowsSpecificHTTPSCertificateForHost(const WebCore::AuthenticationChallenge&amp; challenge)
</span><span class="cx"> {
</span><span class="lines">@@ -315,7 +318,12 @@
</span><span class="cx">         return false;
</span><span class="cx">     RetainPtr&lt;SecTrustRef&gt; trust = adoptCF(trustRef);
</span><span class="cx"> 
</span><ins>+#if USE(CFURLCONNECTION)
+    notImplemented();
+    return false;
+#else
</ins><span class="cx">     return certificatesMatch(trust.get(), challenge.nsURLAuthenticationChallenge().protectionSpace.serverTrust);
</span><ins>+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> String NetworkDataTaskCocoa::suggestedFilename() const
</span><span class="lines">@@ -363,7 +371,12 @@
</span><span class="cx"> 
</span><span class="cx"> WebCore::Credential serverTrustCredential(const WebCore::AuthenticationChallenge&amp; challenge)
</span><span class="cx"> {
</span><ins>+#if USE(CFURLCONNECTION)
+    notImplemented();
+    return { };
+#else
</ins><span class="cx">     return WebCore::Credential([NSURLCredential credentialForTrust:challenge.nsURLAuthenticationChallenge().protectionSpace.serverTrust]);
</span><ins>+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedAuthenticationmacAuthenticationManagermacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/Authentication/mac/AuthenticationManager.mac.mm (210889 => 210890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/Authentication/mac/AuthenticationManager.mac.mm        2017-01-18 22:48:07 UTC (rev 210889)
+++ trunk/Source/WebKit2/Shared/Authentication/mac/AuthenticationManager.mac.mm        2017-01-18 22:52:17 UTC (rev 210890)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> #include &lt;Security/SecIdentity.h&gt;
</span><span class="cx"> #include &lt;WebCore/AuthenticationChallenge.h&gt;
</span><span class="cx"> #include &lt;WebCore/CertificateInfo.h&gt;
</span><ins>+#include &lt;WebCore/NotImplemented.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> using namespace WebCore;
</span><span class="cx"> 
</span><span class="lines">@@ -80,8 +81,13 @@
</span><span class="cx">         LOG_ERROR(&quot;Unable to create SecIdentityRef with certificate - %i&quot;, result);
</span><span class="cx">         if (completionHandler)
</span><span class="cx">             completionHandler(AuthenticationChallengeDisposition::Cancel, { });
</span><del>-        else
</del><ins>+        else {
+#if USE(CFURLCONNECTION)
+            notImplemented();
+#else
</ins><span class="cx">             [challenge.sender() cancelAuthenticationChallenge:challenge.nsURLAuthenticationChallenge()];
</span><ins>+#endif
+        }
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -88,8 +94,13 @@
</span><span class="cx">     NSURLCredential *credential = [NSURLCredential credentialWithIdentity:identity certificates:chain(certificateInfo) persistence:NSURLCredentialPersistenceNone];
</span><span class="cx">     if (completionHandler)
</span><span class="cx">         completionHandler(AuthenticationChallengeDisposition::UseCredential, Credential(credential));
</span><del>-    else
</del><ins>+    else {
+#if USE(CFURLCONNECTION)
+        notImplemented();
+#else
</ins><span class="cx">         [challenge.sender() useCredential:credential forAuthenticationChallenge:challenge.nsURLAuthenticationChallenge()];
</span><ins>+#endif
+    }
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2configh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/config.h (210889 => 210890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/config.h        2017-01-18 22:48:07 UTC (rev 210889)
+++ trunk/Source/WebKit2/config.h        2017-01-18 22:52:17 UTC (rev 210890)
</span><span class="lines">@@ -75,6 +75,12 @@
</span><span class="cx"> #endif
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if USE(CFURLCONNECTION)
+#ifndef USE_NETWORK_SESSION
+#define USE_NETWORK_SESSION 0
+#endif
+#endif
+
</ins><span class="cx"> #if (PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101200) \
</span><span class="cx">     || (PLATFORM(IOS) &amp;&amp; TARGET_OS_IOS &amp;&amp; __IPHONE_OS_VERSION_MIN_REQUIRED &gt;= 100000) \
</span><span class="cx">     || (PLATFORM(APPLETV) &amp;&amp; __TV_OS_VERSION_MIN_REQUIRED &gt;= 100000) \
</span></span></pre>
</div>
</div>

</body>
</html>