<!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>[160338] trunk/Source/WebCore</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/160338">160338</a></dd>
<dt>Author</dt> <dd>benjamin@webkit.org</dd>
<dt>Date</dt> <dd>2013-12-09 15:45:03 -0800 (Mon, 09 Dec 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Refactor the CFURLConnectionClient to be the synchronous implementation of an abstract network delegate
https://bugs.webkit.org/show_bug.cgi?id=125379

Patch by Benjamin Poulain &lt;bpoulain@apple.com&gt; on 2013-12-09
Reviewed by Alexey Proskuryakov.

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* platform/network/ResourceHandle.h:
* platform/network/ResourceHandleInternal.h:
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::createCFURLConnection):
* platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp: Added.
(WebCore::ResourceHandleCFURLConnectionDelegate::ResourceHandleCFURLConnectionDelegate):
(WebCore::ResourceHandleCFURLConnectionDelegate::~ResourceHandleCFURLConnectionDelegate):
(WebCore::ResourceHandleCFURLConnectionDelegate::willSendRequestCallback):
(WebCore::ResourceHandleCFURLConnectionDelegate::didReceiveResponseCallback):
(WebCore::ResourceHandleCFURLConnectionDelegate::didReceiveDataCallback):
(WebCore::ResourceHandleCFURLConnectionDelegate::didFinishLoadingCallback):
(WebCore::ResourceHandleCFURLConnectionDelegate::didFailCallback):
(WebCore::ResourceHandleCFURLConnectionDelegate::willCacheResponseCallback):
(WebCore::ResourceHandleCFURLConnectionDelegate::didReceiveChallengeCallback):
(WebCore::ResourceHandleCFURLConnectionDelegate::didSendBodyDataCallback):
(WebCore::ResourceHandleCFURLConnectionDelegate::shouldUseCredentialStorageCallback):
(WebCore::ResourceHandleCFURLConnectionDelegate::canRespondToProtectionSpaceCallback):
(WebCore::ResourceHandleCFURLConnectionDelegate::didReceiveDataArrayCallback):
(WebCore::ResourceHandleCFURLConnectionDelegate::makeConnectionClient):
* platform/network/cf/ResourceHandleCFURLConnectionDelegate.h: Added.
* platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp: Added.
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::SynchronousResourceHandleCFURLConnectionDelegate):
(WebCore::synthesizeRedirectResponseIfNecessary):
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::willSendRequest):
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse):
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveData):
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didFinishLoading):
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didFail):
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::willCacheResponse):
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveChallenge):
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didSendBodyData):
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::shouldUseCredentialStorageCallback):
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::canRespondToProtectionSpace):
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveDataArray):
* platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxproj">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkResourceHandleh">trunk/Source/WebCore/platform/network/ResourceHandle.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkResourceHandleInternalh">trunk/Source/WebCore/platform/network/ResourceHandleInternal.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfResourceHandleCFNetcpp">trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformnetworkcfResourceHandleCFURLConnectionDelegatecpp">trunk/Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfResourceHandleCFURLConnectionDelegateh">trunk/Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegate.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfSynchronousResourceHandleCFURLConnectionDelegatecpp">trunk/Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfSynchronousResourceHandleCFURLConnectionDelegateh">trunk/Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (160337 => 160338)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2013-12-09 23:44:19 UTC (rev 160337)
+++ trunk/Source/WebCore/ChangeLog        2013-12-09 23:45:03 UTC (rev 160338)
</span><span class="lines">@@ -1,3 +1,49 @@
</span><ins>+2013-12-09  Benjamin Poulain  &lt;bpoulain@apple.com&gt;
+
+        Refactor the CFURLConnectionClient to be the synchronous implementation of an abstract network delegate
+        https://bugs.webkit.org/show_bug.cgi?id=125379
+
+        Reviewed by Alexey Proskuryakov.
+
+        * WebCore.vcxproj/WebCore.vcxproj:
+        * WebCore.vcxproj/WebCore.vcxproj.filters:
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/network/ResourceHandle.h:
+        * platform/network/ResourceHandleInternal.h:
+        * platform/network/cf/ResourceHandleCFNet.cpp:
+        (WebCore::ResourceHandle::createCFURLConnection):
+        * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp: Added.
+        (WebCore::ResourceHandleCFURLConnectionDelegate::ResourceHandleCFURLConnectionDelegate):
+        (WebCore::ResourceHandleCFURLConnectionDelegate::~ResourceHandleCFURLConnectionDelegate):
+        (WebCore::ResourceHandleCFURLConnectionDelegate::willSendRequestCallback):
+        (WebCore::ResourceHandleCFURLConnectionDelegate::didReceiveResponseCallback):
+        (WebCore::ResourceHandleCFURLConnectionDelegate::didReceiveDataCallback):
+        (WebCore::ResourceHandleCFURLConnectionDelegate::didFinishLoadingCallback):
+        (WebCore::ResourceHandleCFURLConnectionDelegate::didFailCallback):
+        (WebCore::ResourceHandleCFURLConnectionDelegate::willCacheResponseCallback):
+        (WebCore::ResourceHandleCFURLConnectionDelegate::didReceiveChallengeCallback):
+        (WebCore::ResourceHandleCFURLConnectionDelegate::didSendBodyDataCallback):
+        (WebCore::ResourceHandleCFURLConnectionDelegate::shouldUseCredentialStorageCallback):
+        (WebCore::ResourceHandleCFURLConnectionDelegate::canRespondToProtectionSpaceCallback):
+        (WebCore::ResourceHandleCFURLConnectionDelegate::didReceiveDataArrayCallback):
+        (WebCore::ResourceHandleCFURLConnectionDelegate::makeConnectionClient):
+        * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h: Added.
+        * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp: Added.
+        (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::SynchronousResourceHandleCFURLConnectionDelegate):
+        (WebCore::synthesizeRedirectResponseIfNecessary):
+        (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::willSendRequest):
+        (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse):
+        (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveData):
+        (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didFinishLoading):
+        (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didFail):
+        (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::willCacheResponse):
+        (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveChallenge):
+        (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didSendBodyData):
+        (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::shouldUseCredentialStorageCallback):
+        (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::canRespondToProtectionSpace):
+        (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveDataArray):
+        * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h: Added.
+
</ins><span class="cx"> 2013-12-09  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION(r136280): input[type=image] should assume coords of 0,0 when activated without physically clicking
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (160337 => 160338)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2013-12-09 23:44:19 UTC (rev 160337)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2013-12-09 23:45:03 UTC (rev 160338)
</span><span class="lines">@@ -8277,6 +8277,12 @@
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\platform\network\cf\ResourceHandleCFURLConnectionDelegate.cpp&quot;&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+    &lt;/ClCompile&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\platform\network\cf\ResourceRequestCFNet.cpp&quot;&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="lines">@@ -8301,6 +8307,12 @@
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\platform\network\cf\SynchronousResourceHandleCFURLConnectionDelegate.cpp&quot;&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+    &lt;/ClCompile&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\platform\network\win\DownloadBundleWin.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\network\win\NetworkStateNotifierWin.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\network\curl\CookieJarCurl.cpp&quot;&gt;
</span><span class="lines">@@ -19503,11 +19515,13 @@
</span><span class="cx">     &lt;CustomBuildStep Include=&quot;..\platform\network\cf\FormDataStreamCFNet.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\network\cf\LoaderRunLoopCF.h&quot; /&gt;
</span><span class="cx">     &lt;CustomBuildStep Include=&quot;..\platform\network\cf\ResourceError.h&quot; /&gt;
</span><ins>+    &lt;CustomBuildStep Include=&quot;..\platform\network\cf\ResourceHandleCFURLConnectionDelegate.h&quot; /&gt;
</ins><span class="cx">     &lt;CustomBuildStep Include=&quot;..\platform\network\cf\ResourceRequest.h&quot; /&gt;
</span><span class="cx">     &lt;CustomBuildStep Include=&quot;..\platform\network\cf\ResourceRequestCFNet.h&quot; /&gt;
</span><span class="cx">     &lt;CustomBuildStep Include=&quot;..\platform\network\cf\ResourceResponse.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\network\cf\SocketStreamError.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\network\cf\SocketStreamHandle.h&quot; /&gt;
</span><ins>+    &lt;CustomBuildStep Include=&quot;..\platform\network\cf\SynchronousResourceHandleCFURLConnectionDelegate.h&quot; /&gt;
</ins><span class="cx">     &lt;CustomBuildStep Include=&quot;..\platform\network\curl\AuthenticationChallenge.h&quot;&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (160337 => 160338)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2013-12-09 23:44:19 UTC (rev 160337)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2013-12-09 23:45:03 UTC (rev 160338)
</span><span class="lines">@@ -1881,6 +1881,9 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\network\cf\ResourceHandleCFNet.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;platform\network\cf&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\platform\network\cf\ResourceHandleCFURLConnectionDelegate.cpp&quot;&gt;
+      &lt;Filter&gt;platform\network\cf&lt;/Filter&gt;
+    &lt;/ClCompile&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\platform\network\cf\ResourceRequestCFNet.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;platform\network\cf&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="lines">@@ -1893,6 +1896,9 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\network\cf\SynchronousLoaderClientCFNet.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;platform\network\cf&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\platform\network\cf\SynchronousResourceHandleCFURLConnectionDelegate.cpp&quot;&gt;
+      &lt;Filter&gt;platform\network\cf&lt;/Filter&gt;
+    &lt;/ClCompile&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\platform\network\win\DownloadBundleWin.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;platform\network\win&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="lines">@@ -15092,6 +15098,9 @@
</span><span class="cx">     &lt;CustomBuildStep Include=&quot;..\platform\network\cf\ResourceError.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;platform\network\cf&lt;/Filter&gt;
</span><span class="cx">     &lt;/CustomBuildStep&gt;
</span><ins>+    &lt;CustomBuildStep Include=&quot;..\platform\network\cf\ResourceHandleCFURLConnectionDelegate.h&quot;&gt;
+      &lt;Filter&gt;platform\network\cf&lt;/Filter&gt;
+    &lt;/CustomBuildStep&gt;
</ins><span class="cx">     &lt;CustomBuildStep Include=&quot;..\platform\network\cf\ResourceRequest.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;platform\network\cf&lt;/Filter&gt;
</span><span class="cx">     &lt;/CustomBuildStep&gt;
</span><span class="lines">@@ -15101,6 +15110,9 @@
</span><span class="cx">     &lt;CustomBuildStep Include=&quot;..\platform\network\cf\ResourceResponse.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;platform\network\cf&lt;/Filter&gt;
</span><span class="cx">     &lt;/CustomBuildStep&gt;
</span><ins>+    &lt;CustomBuildStep Include=&quot;..\platform\network\cf\SynchronousResourceHandleCFURLConnectionDelegate.h&quot;&gt;
+      &lt;Filter&gt;platform\network\cf&lt;/Filter&gt;
+    &lt;/CustomBuildStep&gt;
</ins><span class="cx">     &lt;CustomBuildStep Include=&quot;..\platform\network\curl\AuthenticationChallenge.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;platform\network\curl&lt;/Filter&gt;
</span><span class="cx">     &lt;/CustomBuildStep&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (160337 => 160338)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2013-12-09 23:44:19 UTC (rev 160337)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2013-12-09 23:45:03 UTC (rev 160338)
</span><span class="lines">@@ -914,6 +914,10 @@
</span><span class="cx">                 26C17A3F1491D2D400D12BA2 /* FileSystemIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 26C17A3D1491D2D400D12BA2 /* FileSystemIOS.mm */; };
</span><span class="cx">                 26E98A10130A9FCA008EB7B2 /* TextCodecASCIIFastPath.h in Headers */ = {isa = PBXBuildFile; fileRef = 26E98A0F130A9FCA008EB7B2 /* TextCodecASCIIFastPath.h */; };
</span><span class="cx">                 26F40D4A14904A6300CA67C4 /* EventLoopIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 26F40D4914904A6300CA67C4 /* EventLoopIOS.mm */; };
</span><ins>+                26FAE4CC1852E3A5004C8C46 /* ResourceHandleCFURLConnectionDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26FAE4C81852E3A5004C8C46 /* ResourceHandleCFURLConnectionDelegate.cpp */; };
+                26FAE4CD1852E3A5004C8C46 /* ResourceHandleCFURLConnectionDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 26FAE4C91852E3A5004C8C46 /* ResourceHandleCFURLConnectionDelegate.h */; };
+                26FAE4CE1852E3A5004C8C46 /* SynchronousResourceHandleCFURLConnectionDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26FAE4CA1852E3A5004C8C46 /* SynchronousResourceHandleCFURLConnectionDelegate.cpp */; };
+                26FAE4CF1852E3A5004C8C46 /* SynchronousResourceHandleCFURLConnectionDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 26FAE4CB1852E3A5004C8C46 /* SynchronousResourceHandleCFURLConnectionDelegate.h */; };
</ins><span class="cx">                 2917B5611473496C0052C9D0 /* LayerFlushScheduler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2917B55E1473496C0052C9D0 /* LayerFlushScheduler.cpp */; };
</span><span class="cx">                 2917B5621473496C0052C9D0 /* LayerFlushScheduler.h in Headers */ = {isa = PBXBuildFile; fileRef = 2917B55F1473496C0052C9D0 /* LayerFlushScheduler.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 2917B5631473496C0052C9D0 /* LayerFlushSchedulerClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 2917B5601473496C0052C9D0 /* LayerFlushSchedulerClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -5269,6 +5273,7 @@
</span><span class="cx">                 C5278B0C17F212EA003A2998 /* PlatformPasteboardIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = C5278B0B17F212EA003A2998 /* PlatformPasteboardIOS.mm */; };
</span><span class="cx">                 C544274B11A57E7A0063A749 /* DOMStringList.h in Headers */ = {isa = PBXBuildFile; fileRef = C544274911A57E7A0063A749 /* DOMStringList.h */; };
</span><span class="cx">                 C55610F111A704EB00B82D27 /* DOMStringList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C55610F011A704EB00B82D27 /* DOMStringList.cpp */; };
</span><ins>+                C55C7BA11718AFBA001327E4 /* RenderThemeIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = C55C7BA01718AFBA001327E4 /* RenderThemeIOS.mm */; };
</ins><span class="cx">                 C55E38BF10040D5D00A56BDB /* StorageNamespaceImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = C55E38BB10040D5D00A56BDB /* StorageNamespaceImpl.h */; };
</span><span class="cx">                 C55E38C010040D5D00A56BDB /* StorageNamespaceImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C55E38BC10040D5D00A56BDB /* StorageNamespaceImpl.cpp */; };
</span><span class="cx">                 C572EE1F1201C9BC007D8F82 /* JSIDBIndex.h in Headers */ = {isa = PBXBuildFile; fileRef = C572EE1D1201C9BC007D8F82 /* JSIDBIndex.h */; };
</span><span class="lines">@@ -5450,8 +5455,6 @@
</span><span class="cx">                 CE7B2DB51586ABAD0098B3FA /* TextAlternativeWithRange.h in Headers */ = {isa = PBXBuildFile; fileRef = CE7B2DB11586ABAD0098B3FA /* TextAlternativeWithRange.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 CE7B2DB61586ABAD0098B3FA /* TextAlternativeWithRange.mm in Sources */ = {isa = PBXBuildFile; fileRef = CE7B2DB21586ABAD0098B3FA /* TextAlternativeWithRange.mm */; };
</span><span class="cx">                 CE95208A1811B475007A5392 /* WebSafeIncrementalSweeperIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = C2C4CB1D161A131200D214DA /* WebSafeIncrementalSweeperIOS.h */; };
</span><del>-                FED13D520CEA949700D89466 /* RenderThemeIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = FED13D500CEA949700D89466 /* RenderThemeIOS.h */; };
-                C55C7BA11718AFBA001327E4 /* RenderThemeIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = C55C7BA01718AFBA001327E4 /* RenderThemeIOS.mm */; };
</del><span class="cx">                 CECADFC6153778FF00E37068 /* DictationAlternative.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CECADFC2153778FF00E37068 /* DictationAlternative.cpp */; };
</span><span class="cx">                 CECADFC7153778FF00E37068 /* DictationAlternative.h in Headers */ = {isa = PBXBuildFile; fileRef = CECADFC3153778FF00E37068 /* DictationAlternative.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 CECADFC8153778FF00E37068 /* DictationCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CECADFC4153778FF00E37068 /* DictationCommand.cpp */; };
</span><span class="lines">@@ -6328,6 +6331,7 @@
</span><span class="cx">                 FEBC5F3116BD0CC300659BD3 /* DatabaseBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FEBC5F2F16BD0CC300659BD3 /* DatabaseBase.cpp */; };
</span><span class="cx">                 FEBC5F3216BD0CC300659BD3 /* DatabaseBase.h in Headers */ = {isa = PBXBuildFile; fileRef = FEBC5F3016BD0CC300659BD3 /* DatabaseBase.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 FED13D3A0CEA934600D89466 /* EditorIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = FED13D390CEA934600D89466 /* EditorIOS.mm */; };
</span><ins>+                FED13D520CEA949700D89466 /* RenderThemeIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = FED13D500CEA949700D89466 /* RenderThemeIOS.h */; };
</ins><span class="cx">                 FED48390CED66C3255F72C59 /* MathMLSelectElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F75A059AF170D8FAA5B8CABE /* MathMLSelectElement.cpp */; };
</span><span class="cx">                 FEDBFF16182B7A8D0017FA64 /* BreakpointID.h in Headers */ = {isa = PBXBuildFile; fileRef = FEDBFF14182B7A8D0017FA64 /* BreakpointID.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 FEDEF84116797108000E444A /* DatabaseStrategy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FEDEF83F16797108000E444A /* DatabaseStrategy.cpp */; };
</span><span class="lines">@@ -7564,6 +7568,10 @@
</span><span class="cx">                 26C17A3D1491D2D400D12BA2 /* FileSystemIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = FileSystemIOS.mm; path = ios/FileSystemIOS.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 26E98A0F130A9FCA008EB7B2 /* TextCodecASCIIFastPath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextCodecASCIIFastPath.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 26F40D4914904A6300CA67C4 /* EventLoopIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = EventLoopIOS.mm; path = ios/EventLoopIOS.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                26FAE4C81852E3A5004C8C46 /* ResourceHandleCFURLConnectionDelegate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResourceHandleCFURLConnectionDelegate.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                26FAE4C91852E3A5004C8C46 /* ResourceHandleCFURLConnectionDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceHandleCFURLConnectionDelegate.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                26FAE4CA1852E3A5004C8C46 /* SynchronousResourceHandleCFURLConnectionDelegate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SynchronousResourceHandleCFURLConnectionDelegate.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                26FAE4CB1852E3A5004C8C46 /* SynchronousResourceHandleCFURLConnectionDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SynchronousResourceHandleCFURLConnectionDelegate.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 2917B55E1473496C0052C9D0 /* LayerFlushScheduler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LayerFlushScheduler.cpp; path = ca/LayerFlushScheduler.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2917B55F1473496C0052C9D0 /* LayerFlushScheduler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LayerFlushScheduler.h; path = ca/LayerFlushScheduler.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2917B5601473496C0052C9D0 /* LayerFlushSchedulerClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LayerFlushSchedulerClient.h; path = ca/LayerFlushSchedulerClient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -12350,6 +12358,7 @@
</span><span class="cx">                 C544274911A57E7A0063A749 /* DOMStringList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMStringList.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 C544274A11A57E7A0063A749 /* DOMStringList.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMStringList.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 C55610F011A704EB00B82D27 /* DOMStringList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMStringList.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                C55C7BA01718AFBA001327E4 /* RenderThemeIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RenderThemeIOS.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 C55E38BB10040D5D00A56BDB /* StorageNamespaceImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StorageNamespaceImpl.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 C55E38BC10040D5D00A56BDB /* StorageNamespaceImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StorageNamespaceImpl.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 C572EE1D1201C9BC007D8F82 /* JSIDBIndex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSIDBIndex.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -12584,8 +12593,6 @@
</span><span class="cx">                 CE7B2DB01586ABAD0098B3FA /* AlternativeTextUIController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AlternativeTextUIController.mm; path = mac/AlternativeTextUIController.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 CE7B2DB11586ABAD0098B3FA /* TextAlternativeWithRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TextAlternativeWithRange.h; path = mac/TextAlternativeWithRange.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 CE7B2DB21586ABAD0098B3FA /* TextAlternativeWithRange.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = TextAlternativeWithRange.mm; path = mac/TextAlternativeWithRange.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                FED13D500CEA949700D89466 /* RenderThemeIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderThemeIOS.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                C55C7BA01718AFBA001327E4 /* RenderThemeIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RenderThemeIOS.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 CECADFC2153778FF00E37068 /* DictationAlternative.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DictationAlternative.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 CECADFC3153778FF00E37068 /* DictationAlternative.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DictationAlternative.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 CECADFC4153778FF00E37068 /* DictationCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DictationCommand.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -13557,6 +13564,7 @@
</span><span class="cx">                 FEBC5F2F16BD0CC300659BD3 /* DatabaseBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DatabaseBase.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 FEBC5F3016BD0CC300659BD3 /* DatabaseBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DatabaseBase.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 FED13D390CEA934600D89466 /* EditorIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = EditorIOS.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                FED13D500CEA949700D89466 /* RenderThemeIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderThemeIOS.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 FEDBFF14182B7A8D0017FA64 /* BreakpointID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BreakpointID.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 FEDEF83F16797108000E444A /* DatabaseStrategy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DatabaseStrategy.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 FEDEF84016797108000E444A /* DatabaseStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DatabaseStrategy.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -19546,6 +19554,8 @@
</span><span class="cx">                                 7EE6845712D26E3800E79415 /* ResourceError.h */,
</span><span class="cx">                                 7EE6845812D26E3800E79415 /* ResourceErrorCF.cpp */,
</span><span class="cx">                                 7EE6845912D26E3800E79415 /* ResourceHandleCFNet.cpp */,
</span><ins>+                                26FAE4C81852E3A5004C8C46 /* ResourceHandleCFURLConnectionDelegate.cpp */,
+                                26FAE4C91852E3A5004C8C46 /* ResourceHandleCFURLConnectionDelegate.h */,
</ins><span class="cx">                                 7EE6845A12D26E3800E79415 /* ResourceRequest.h */,
</span><span class="cx">                                 7EE6845B12D26E3800E79415 /* ResourceRequestCFNet.cpp */,
</span><span class="cx">                                 7EE6845C12D26E3800E79415 /* ResourceRequestCFNet.h */,
</span><span class="lines">@@ -19555,6 +19565,8 @@
</span><span class="cx">                                 51ABAE1C103C1913008C5260 /* SocketStreamHandle.h */,
</span><span class="cx">                                 51ABAE1D103C1913008C5260 /* SocketStreamHandleCFNet.cpp */,
</span><span class="cx">                                 442ABCD517D9262F00D30715 /* SynchronousLoaderClientCFNet.cpp */,
</span><ins>+                                26FAE4CA1852E3A5004C8C46 /* SynchronousResourceHandleCFURLConnectionDelegate.cpp */,
+                                26FAE4CB1852E3A5004C8C46 /* SynchronousResourceHandleCFURLConnectionDelegate.h */,
</ins><span class="cx">                         );
</span><span class="cx">                         path = cf;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -24507,6 +24519,7 @@
</span><span class="cx">                                 7EE6846A12D26E3800E79415 /* ResourceError.h in Headers */,
</span><span class="cx">                                 934F713C0D5A6F1900018D69 /* ResourceErrorBase.h in Headers */,
</span><span class="cx">                                 514C76790CE923A1007EF3CD /* ResourceHandle.h in Headers */,
</span><ins>+                                26FAE4CD1852E3A5004C8C46 /* ResourceHandleCFURLConnectionDelegate.h in Headers */,
</ins><span class="cx">                                 514C767A0CE923A1007EF3CD /* ResourceHandleClient.h in Headers */,
</span><span class="cx">                                 514C767B0CE923A1007EF3CD /* ResourceHandleInternal.h in Headers */,
</span><span class="cx">                                 51E4143416A6596300C633C7 /* ResourceHandleTypes.h in Headers */,
</span><span class="lines">@@ -25032,6 +25045,7 @@
</span><span class="cx">                                 B2227AF60D00BF220071B782 /* SVGZoomAndPan.h in Headers */,
</span><span class="cx">                                 B2E4EC980D00C22B00432643 /* SVGZoomEvent.h in Headers */,
</span><span class="cx">                                 E180811716FCF9CB00B80D07 /* SynchronousLoaderClient.h in Headers */,
</span><ins>+                                26FAE4CF1852E3A5004C8C46 /* SynchronousResourceHandleCFURLConnectionDelegate.h in Headers */,
</ins><span class="cx">                                 5DA97ECD168E787B000E3676 /* SystemVersionMac.h in Headers */,
</span><span class="cx">                                 A8CFF0510A154F09000A4234 /* TableLayout.h in Headers */,
</span><span class="cx">                                 072AE1E5183C0741000A5988 /* PluginReplacement.h in Headers */,
</span><span class="lines">@@ -27751,6 +27765,7 @@
</span><span class="cx">                                 0705851217FA7107005F2BCB /* JSMediaStreamCapabilities.cpp in Sources */,
</span><span class="cx">                                 514C76780CE923A1007EF3CD /* ResourceHandle.cpp in Sources */,
</span><span class="cx">                                 7EE6846C12D26E3800E79415 /* ResourceHandleCFNet.cpp in Sources */,
</span><ins>+                                26FAE4CC1852E3A5004C8C46 /* ResourceHandleCFURLConnectionDelegate.cpp in Sources */,
</ins><span class="cx">                                 E1BA003116FB92AC00BA7A35 /* ResourceHandleClient.cpp in Sources */,
</span><span class="cx">                                 514C76510CE9234E007EF3CD /* ResourceHandleMac.mm in Sources */,
</span><span class="cx">                                 93E227E30AF589AD00D48324 /* ResourceLoader.cpp in Sources */,
</span><span class="lines">@@ -28000,6 +28015,7 @@
</span><span class="cx">                                 93B2D8180F9920EE006AE6B2 /* SuddenTermination.mm in Sources */,
</span><span class="cx">                                 087558C513B4A57D00F49307 /* SurrogatePairAwareTextIterator.cpp in Sources */,
</span><span class="cx">                                 62C1217C11AB9E77003C462C /* SuspendableTimer.cpp in Sources */,
</span><ins>+                                26FAE4CE1852E3A5004C8C46 /* SynchronousResourceHandleCFURLConnectionDelegate.cpp in Sources */,
</ins><span class="cx">                                 B22279730D00BF220071B782 /* SVGAElement.cpp in Sources */,
</span><span class="cx">                                 24D912B013CA9A1F00D21915 /* SVGAltGlyphDefElement.cpp in Sources */,
</span><span class="cx">                                 65653F2D0D9727D200CA9723 /* SVGAltGlyphElement.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceHandleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceHandle.h (160337 => 160338)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceHandle.h        2013-12-09 23:44:19 UTC (rev 160337)
+++ trunk/Source/WebCore/platform/network/ResourceHandle.h        2013-12-09 23:45:03 UTC (rev 160338)
</span><span class="lines">@@ -72,7 +72,6 @@
</span><span class="cx"> typedef struct _CFURLConnection* CFURLConnectionRef;
</span><span class="cx"> typedef int CFHTTPCookieStorageAcceptPolicy;
</span><span class="cx"> typedef struct OpaqueCFHTTPCookieStorage* CFHTTPCookieStorageRef;
</span><del>-typedef struct CFURLConnectionClient_V6 CFURLConnectionClient_V6;
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC) || USE(CFNETWORK)
</span><span class="lines">@@ -142,7 +141,6 @@
</span><span class="cx">     const ResourceRequest&amp; currentRequest() const;
</span><span class="cx">     static void setHostAllowsAnyHTTPSCertificate(const String&amp;);
</span><span class="cx">     static void setClientCertificate(const String&amp; host, CFDataRef);
</span><del>-    static CFURLConnectionClient_V6* connectionClientCallbacks();
</del><span class="cx"> 
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><span class="cx">     QuickLookHandle* quickLookHandle() { return m_quickLook.get(); }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceHandleInternalh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceHandleInternal.h (160337 => 160338)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceHandleInternal.h        2013-12-09 23:44:19 UTC (rev 160337)
+++ trunk/Source/WebCore/platform/network/ResourceHandleInternal.h        2013-12-09 23:45:03 UTC (rev 160338)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> #include &quot;Timer.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #if USE(CFNETWORK)
</span><ins>+#include &quot;ResourceHandleCFURLConnectionDelegate.h&quot;
</ins><span class="cx"> #include &lt;CFNetwork/CFURLConnectionPriv.h&gt;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -146,6 +147,7 @@
</span><span class="cx"> #if USE(CFNETWORK)
</span><span class="cx">         RetainPtr&lt;CFURLConnectionRef&gt; m_connection;
</span><span class="cx">         ResourceRequest m_currentRequest;
</span><ins>+        RefPtr&lt;ResourceHandleCFURLConnectionDelegate&gt; m_connectionDelegate;
</ins><span class="cx"> #endif
</span><span class="cx"> #if PLATFORM(MAC) &amp;&amp; !USE(CFNETWORK)
</span><span class="cx">         RetainPtr&lt;NSURLConnection&gt; m_connection;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfResourceHandleCFNetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp (160337 => 160338)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp        2013-12-09 23:44:19 UTC (rev 160337)
+++ trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp        2013-12-09 23:45:03 UTC (rev 160338)
</span><span class="lines">@@ -36,13 +36,13 @@
</span><span class="cx"> #include &quot;FrameLoader.h&quot;
</span><span class="cx"> #include &quot;LoaderRunLoopCF.h&quot;
</span><span class="cx"> #include &quot;Logging.h&quot;
</span><del>-#include &quot;MIMETypeRegistry.h&quot;
</del><span class="cx"> #include &quot;NetworkingContext.h&quot;
</span><span class="cx"> #include &quot;ResourceError.h&quot;
</span><span class="cx"> #include &quot;ResourceHandleClient.h&quot;
</span><span class="cx"> #include &quot;ResourceResponse.h&quot;
</span><span class="cx"> #include &quot;SharedBuffer.h&quot;
</span><span class="cx"> #include &quot;SynchronousLoaderClient.h&quot;
</span><ins>+#include &quot;SynchronousResourceHandleCFURLConnectionDelegate.h&quot;
</ins><span class="cx"> #include &lt;CFNetwork/CFNetwork.h&gt;
</span><span class="cx"> #include &lt;sys/stat.h&gt;
</span><span class="cx"> #include &lt;sys/types.h&gt;
</span><span class="lines">@@ -96,15 +96,6 @@
</span><span class="cx">     return certs;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if !PLATFORM(MAC)
-static void setDefaultMIMEType(CFURLResponseRef response)
-{
-    static CFStringRef defaultMIMETypeString = defaultMIMEType().createCFString().leakRef();
-    
-    CFURLResponseSetMIMEType(response, defaultMIMETypeString);
-}
-#endif
-
</del><span class="cx"> static void applyBasicAuthorizationHeader(ResourceRequest&amp; request, const Credential&amp; credential)
</span><span class="cx"> {
</span><span class="cx">     String authenticationHeader = &quot;Basic &quot; + base64Encode(String(credential.user() + &quot;:&quot; + credential.password()).utf8());
</span><span class="lines">@@ -112,289 +103,6 @@
</span><span class="cx">     request.addHTTPHeaderField(&quot;Authorization&quot;, authenticationHeader);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static RetainPtr&lt;CFURLResponseRef&gt; synthesizeRedirectResponseIfNecessary(const ResourceRequest&amp; currentRequest, CFURLRequestRef newRequest, CFURLResponseRef cfRedirectResponse)
-{
-    if (cfRedirectResponse)
-        return cfRedirectResponse;
-
-    CFURLRef newURL = CFURLRequestGetURL(newRequest);
-    RetainPtr&lt;CFStringRef&gt; newScheme = adoptCF(CFURLCopyScheme(newURL));
-
-    // If the protocols of the new request and the current request match, this is not an HSTS redirect and we shouldn't synthesize a redirect response.
-    if (currentRequest.url().protocol() == String(newScheme.get()))
-        return 0;
-
-    RetainPtr&lt;CFURLRef&gt; currentURL = currentRequest.url().createCFURL();
-    RetainPtr&lt;CFHTTPMessageRef&gt; responseMessage = adoptCF(CFHTTPMessageCreateResponse(0, 302, 0, kCFHTTPVersion1_1));
-    RetainPtr&lt;CFURLRef&gt; newAbsoluteURL = adoptCF(CFURLCopyAbsoluteURL(newURL));
-    CFHTTPMessageSetHeaderFieldValue(responseMessage.get(), CFSTR(&quot;Location&quot;), CFURLGetString(newAbsoluteURL.get()));
-    CFHTTPMessageSetHeaderFieldValue(responseMessage.get(), CFSTR(&quot;Cache-Control&quot;), CFSTR(&quot;no-store&quot;));
-
-    RetainPtr&lt;CFURLResponseRef&gt; newResponse = adoptCF(CFURLResponseCreateWithHTTPResponse(0, currentURL.get(), responseMessage.get(), kCFURLCacheStorageNotAllowed));
-    return newResponse;
-}
-
-static CFURLRequestRef willSendRequest(CFURLConnectionRef conn, CFURLRequestRef cfRequest, CFURLResponseRef originalRedirectResponse, const void* clientInfo)
-{
-#if LOG_DISABLED
-    UNUSED_PARAM(conn);
-#endif
-    ResourceHandle* handle = static_cast&lt;ResourceHandle*&gt;(const_cast&lt;void*&gt;(clientInfo));
-    RetainPtr&lt;CFURLResponseRef&gt; redirectResponse = synthesizeRedirectResponseIfNecessary(handle-&gt;currentRequest(), cfRequest, originalRedirectResponse);
-
-    if (!redirectResponse) {
-        CFRetain(cfRequest);
-        return cfRequest;
-    }
-
-    LOG(Network, &quot;CFNet - willSendRequest(conn=%p, handle=%p) (%s)&quot;, conn, handle, handle-&gt;firstRequest().url().string().utf8().data());
-
-    ResourceRequest request;
-    if (redirectResponse) {
-        CFHTTPMessageRef httpMessage = CFURLResponseGetHTTPResponse(redirectResponse.get());
-        if (httpMessage &amp;&amp; CFHTTPMessageGetResponseStatusCode(httpMessage) == 307) {
-            RetainPtr&lt;CFStringRef&gt; lastHTTPMethod = handle-&gt;lastHTTPMethod().createCFString();
-            RetainPtr&lt;CFStringRef&gt; newMethod = adoptCF(CFURLRequestCopyHTTPRequestMethod(cfRequest));
-            if (CFStringCompareWithOptions(lastHTTPMethod.get(), newMethod.get(), CFRangeMake(0, CFStringGetLength(lastHTTPMethod.get())), kCFCompareCaseInsensitive)) {
-                RetainPtr&lt;CFMutableURLRequestRef&gt; mutableRequest = adoptCF(CFURLRequestCreateMutableCopy(0, cfRequest));
-                wkSetRequestStorageSession(handle-&gt;storageSession(), mutableRequest.get());
-                CFURLRequestSetHTTPRequestMethod(mutableRequest.get(), lastHTTPMethod.get());
-
-                FormData* body = handle-&gt;firstRequest().httpBody();
-                if (!equalIgnoringCase(handle-&gt;firstRequest().httpMethod(), &quot;GET&quot;) &amp;&amp; body &amp;&amp; !body-&gt;isEmpty())
-                    WebCore::setHTTPBody(mutableRequest.get(), body);
-
-                String originalContentType = handle-&gt;firstRequest().httpContentType();
-                if (!originalContentType.isEmpty())
-                    CFURLRequestSetHTTPHeaderFieldValue(mutableRequest.get(), CFSTR(&quot;Content-Type&quot;), originalContentType.createCFString().get());
-
-                request = mutableRequest.get();
-            }
-        }
-    }
-    if (request.isNull())
-        request = cfRequest;
-
-    // Should not set Referer after a redirect from a secure resource to non-secure one.
-    if (!request.url().protocolIs(&quot;https&quot;) &amp;&amp; protocolIs(request.httpReferrer(), &quot;https&quot;) &amp;&amp; handle-&gt;context()-&gt;shouldClearReferrerOnHTTPSToHTTPRedirect())
-        request.clearHTTPReferrer();
-
-    handle-&gt;willSendRequest(request, redirectResponse.get());
-
-    if (request.isNull())
-        return 0;
-
-    cfRequest = request.cfURLRequest(UpdateHTTPBody);
-
-    CFRetain(cfRequest);
-    return cfRequest;
-}
-
-static void didReceiveResponse(CFURLConnectionRef conn, CFURLResponseRef cfResponse, const void* clientInfo)
-{
-#if LOG_DISABLED &amp;&amp; !USE(QUICK_LOOK)
-    UNUSED_PARAM(conn);
-#endif
-    ResourceHandle* handle = static_cast&lt;ResourceHandle*&gt;(const_cast&lt;void*&gt;(clientInfo));
-
-    LOG(Network, &quot;CFNet - didReceiveResponse(conn=%p, handle=%p) (%s)&quot;, conn, handle, handle-&gt;firstRequest().url().string().utf8().data());
-
-    if (!handle-&gt;client())
-        return;
-
-#if PLATFORM(MAC)
-    // Avoid MIME type sniffing if the response comes back as 304 Not Modified.
-    CFHTTPMessageRef msg = wkGetCFURLResponseHTTPResponse(cfResponse);
-    int statusCode = msg ? CFHTTPMessageGetResponseStatusCode(msg) : 0;
-
-    if (statusCode != 304)
-        adjustMIMETypeIfNecessary(cfResponse);
-
-#if !PLATFORM(IOS)
-    if (_CFURLRequestCopyProtocolPropertyForKey(handle-&gt;firstRequest().cfURLRequest(DoNotUpdateHTTPBody), CFSTR(&quot;ForceHTMLMIMEType&quot;)))
-        wkSetCFURLResponseMIMEType(cfResponse, CFSTR(&quot;text/html&quot;));
-#endif // !PLATFORM(IOS)
-#else
-    if (!CFURLResponseGetMIMEType(cfResponse)) {
-        // We should never be applying the default MIMEType if we told the networking layer to do content sniffing for handle.
-        ASSERT(!handle-&gt;shouldContentSniff());
-        setDefaultMIMEType(cfResponse);
-    }
-#endif
-
-#if USE(QUICK_LOOK)
-    handle-&gt;setQuickLookHandle(QuickLookHandle::create(handle, conn, cfResponse));
-    if (handle-&gt;quickLookHandle())
-        cfResponse = handle-&gt;quickLookHandle()-&gt;cfResponse();
-#endif
-    
-    handle-&gt;client()-&gt;didReceiveResponse(handle, cfResponse);
-}
-
-#if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
-static void didReceiveDataArray(CFURLConnectionRef conn, CFArrayRef dataArray, const void* clientInfo)
-{
-#if LOG_DISABLED
-    UNUSED_PARAM(conn);
-#endif
-    ResourceHandle* handle = static_cast&lt;ResourceHandle*&gt;(const_cast&lt;void*&gt;(clientInfo));
-    if (!handle-&gt;client())
-        return;
-
-    LOG(Network, &quot;CFNet - didReceiveDataArray(conn=%p, handle=%p, arrayLength=%ld) (%s)&quot;, conn, handle, CFArrayGetCount(dataArray), handle-&gt;firstRequest().url().string().utf8().data());
-
-#if USE(QUICK_LOOK)
-    if (handle-&gt;quickLookHandle() &amp;&amp; handle-&gt;quickLookHandle()-&gt;didReceiveDataArray(dataArray))
-        return;
-#endif
-
-    handle-&gt;handleDataArray(dataArray);
-}
-#endif
-
-static void didReceiveData(CFURLConnectionRef conn, CFDataRef data, CFIndex originalLength, const void* clientInfo)
-{
-    ResourceHandle* handle = static_cast&lt;ResourceHandle*&gt;(const_cast&lt;void*&gt;(clientInfo));
-
-#if LOG_DISABLED
-    UNUSED_PARAM(conn);
-#else
-    CFIndex length = CFDataGetLength(data);
-    LOG(Network, &quot;CFNet - didReceiveData(conn=%p, handle=%p, bytes=%ld) (%s)&quot;, conn, handle, length, handle-&gt;firstRequest().url().string().utf8().data());
-#endif
-
-#if USE(QUICK_LOOK)
-    if (handle-&gt;quickLookHandle() &amp;&amp; handle-&gt;quickLookHandle()-&gt;didReceiveData(data))
-        return;
-#endif
-
-    if (ResourceHandleClient* client = handle-&gt;client())
-        client-&gt;didReceiveBuffer(handle, SharedBuffer::wrapCFData(data), originalLength);
-}
-
-static void didSendBodyData(CFURLConnectionRef, CFIndex, CFIndex totalBytesWritten, CFIndex totalBytesExpectedToWrite, const void *clientInfo)
-{
-    ResourceHandle* handle = static_cast&lt;ResourceHandle*&gt;(const_cast&lt;void*&gt;(clientInfo));
-    if (!handle || !handle-&gt;client())
-        return;
-    handle-&gt;client()-&gt;didSendData(handle, totalBytesWritten, totalBytesExpectedToWrite);
-}
-
-static Boolean shouldUseCredentialStorageCallback(CFURLConnectionRef conn, const void* clientInfo)
-{
-#if LOG_DISABLED
-    UNUSED_PARAM(conn);
-#endif
-    ResourceHandle* handle = const_cast&lt;ResourceHandle*&gt;(static_cast&lt;const ResourceHandle*&gt;(clientInfo));
-
-    LOG(Network, &quot;CFNet - shouldUseCredentialStorage(conn=%p, handle=%p) (%s)&quot;, conn, handle, handle-&gt;firstRequest().url().string().utf8().data());
-
-    if (!handle)
-        return false;
-
-    return handle-&gt;shouldUseCredentialStorage();
-}
-
-static void didFinishLoading(CFURLConnectionRef conn, const void* clientInfo)
-{
-#if LOG_DISABLED
-    UNUSED_PARAM(conn);
-#endif
-    ResourceHandle* handle = static_cast&lt;ResourceHandle*&gt;(const_cast&lt;void*&gt;(clientInfo));
-
-    LOG(Network, &quot;CFNet - didFinishLoading(conn=%p, handle=%p) (%s)&quot;, conn, handle, handle-&gt;firstRequest().url().string().utf8().data());
-
-#if USE(QUICK_LOOK)
-    if (handle-&gt;quickLookHandle() &amp;&amp; handle-&gt;quickLookHandle()-&gt;didFinishLoading())
-        return;
-#endif
-
-    if (handle-&gt;client())
-        handle-&gt;client()-&gt;didFinishLoading(handle, 0);
-}
-
-static void didFail(CFURLConnectionRef conn, CFErrorRef error, const void* clientInfo)
-{
-#if LOG_DISABLED
-    UNUSED_PARAM(conn);
-#endif
-    ResourceHandle* handle = static_cast&lt;ResourceHandle*&gt;(const_cast&lt;void*&gt;(clientInfo));
-
-    LOG(Network, &quot;CFNet - didFail(conn=%p, handle=%p, error = %p) (%s)&quot;, conn, handle, error, handle-&gt;firstRequest().url().string().utf8().data());
-
-#if USE(QUICK_LOOK)
-    if (handle-&gt;quickLookHandle())
-        handle-&gt;quickLookHandle()-&gt;didFail();
-#endif
-
-    if (handle-&gt;client())
-        handle-&gt;client()-&gt;didFail(handle, ResourceError(error));
-}
-
-static CFCachedURLResponseRef willCacheResponse(CFURLConnectionRef, CFCachedURLResponseRef cachedResponse, const void* clientInfo)
-{
-    ResourceHandle* handle = static_cast&lt;ResourceHandle*&gt;(const_cast&lt;void*&gt;(clientInfo));
-
-#if PLATFORM(WIN)
-    // Workaround for &lt;rdar://problem/6300990&gt; Caching does not respect Vary HTTP header.
-    // FIXME: WebCore cache has issues with Vary, too (bug 58797, bug 71509).
-    CFURLResponseRef wrappedResponse = CFCachedURLResponseGetWrappedResponse(cachedResponse);
-    if (CFHTTPMessageRef httpResponse = CFURLResponseGetHTTPResponse(wrappedResponse)) {
-        ASSERT(CFHTTPMessageIsHeaderComplete(httpResponse));
-        RetainPtr&lt;CFStringRef&gt; varyValue = adoptCF(CFHTTPMessageCopyHeaderFieldValue(httpResponse, CFSTR(&quot;Vary&quot;)));
-        if (varyValue)
-            return 0;
-    }
-#endif // PLATFORM(WIN)
-
-#if PLATFORM(WIN)
-    if (handle-&gt;client() &amp;&amp; !handle-&gt;client()-&gt;shouldCacheResponse(handle, cachedResponse))
-        return 0;
-#else
-    CFCachedURLResponseRef newResponse = handle-&gt;client()-&gt;willCacheResponse(handle, cachedResponse);
-    if (newResponse != cachedResponse)
-        return newResponse;
-#endif
-
-    CFRetain(cachedResponse);
-
-    return cachedResponse;
-}
-
-static void didReceiveChallenge(CFURLConnectionRef conn, CFURLAuthChallengeRef challenge, const void* clientInfo)
-{
-#if LOG_DISABLED
-    UNUSED_PARAM(conn);
-#endif
-    ResourceHandle* handle = static_cast&lt;ResourceHandle*&gt;(const_cast&lt;void*&gt;(clientInfo));
-    ASSERT(handle);
-    LOG(Network, &quot;CFNet - didReceiveChallenge(conn=%p, handle=%p (%s)&quot;, conn, handle, handle-&gt;firstRequest().url().string().utf8().data());
-
-    handle-&gt;didReceiveAuthenticationChallenge(AuthenticationChallenge(challenge, handle));
-}
-
-#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
-static Boolean canRespondToProtectionSpace(CFURLConnectionRef conn, CFURLProtectionSpaceRef protectionSpace, const void* clientInfo)
-{
-#if LOG_DISABLED
-    UNUSED_PARAM(conn);
-#endif
-    ResourceHandle* handle = static_cast&lt;ResourceHandle*&gt;(const_cast&lt;void*&gt;(clientInfo));
-    ASSERT(handle);
-
-    LOG(Network, &quot;CFNet - canRespondToProtectionSpace(conn=%p, handle=%p (%s)&quot;, conn, handle, handle-&gt;firstRequest().url().string().utf8().data());
-
-#if PLATFORM(IOS)
-    ProtectionSpace coreProtectionSpace = core(protectionSpace);
-    if (coreProtectionSpace.authenticationScheme() == ProtectionSpaceAuthenticationSchemeUnknown)
-        return false;
-    return handle-&gt;canAuthenticateAgainstProtectionSpace(coreProtectionSpace);
-#else
-    return handle-&gt;canAuthenticateAgainstProtectionSpace(core(protectionSpace));
-#endif
-}
-#endif
-
</del><span class="cx"> ResourceHandleInternal::~ResourceHandleInternal()
</span><span class="cx"> {
</span><span class="cx">     if (m_connection) {
</span><span class="lines">@@ -477,9 +185,6 @@
</span><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    CFURLConnectionClient_V6 client = *ResourceHandle::connectionClientCallbacks();
-    client.clientInfo = this;
-
</del><span class="cx">     CFMutableDictionaryRef streamProperties  = CFDictionaryCreateMutable(0, 0, &amp;kCFTypeDictionaryKeyCallBacks, &amp;kCFTypeDictionaryValueCallBacks);
</span><span class="cx">     if (!shouldUseCredentialStorage)
</span><span class="cx">         CFDictionarySetValue(streamProperties, CFSTR(&quot;_kCFURLConnectionSessionID&quot;), CFSTR(&quot;WebKitPrivateSession&quot;));
</span><span class="lines">@@ -502,6 +207,10 @@
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     CFURLRequestSetShouldStartSynchronously(request.get(), 1);
</span><span class="cx"> #endif
</span><ins>+
+    d-&gt;m_connectionDelegate = adoptRef(new SynchronousResourceHandleCFURLConnectionDelegate(this));
+    CFURLConnectionClient_V6 client = d-&gt;m_connectionDelegate-&gt;makeConnectionClient();
+
</ins><span class="cx">     d-&gt;m_connection = adoptCF(CFURLConnectionCreateWithProperties(0, request.get(), reinterpret_cast&lt;CFURLConnectionClient*&gt;(&amp;client), propertiesDictionary.get()));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -877,24 +586,4 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if USE(CFNETWORK)
-CFURLConnectionClient_V6* ResourceHandle::connectionClientCallbacks()
-{
-    static CFURLConnectionClient_V6 client = { 6, 0, 0, 0, 0, WebCore::willSendRequest, didReceiveResponse, didReceiveData, 0, didFinishLoading, didFail, willCacheResponse, didReceiveChallenge, didSendBodyData, shouldUseCredentialStorageCallback, 0,
-#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
-        canRespondToProtectionSpace,
-#else
-        0,
-#endif
-        0,
-#if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
-        didReceiveDataArray
-#else
-        0
-#endif
-    };
-    return &amp;client;
-}
-#endif // USE(QUICK_LOOK) &amp;&amp; USE(CFNETWORK)
-
</del><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfResourceHandleCFURLConnectionDelegatecpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp (0 => 160338)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp                                (rev 0)
+++ trunk/Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp        2013-12-09 23:45:03 UTC (rev 160338)
</span><span class="lines">@@ -0,0 +1,133 @@
</span><ins>+/*
+ * Copyright (C) 2004-2013 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 COMPUTER, 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 COMPUTER, 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.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;ResourceHandleCFURLConnectionDelegate.h&quot;
+
+#if USE(CFNETWORK)
+
+namespace WebCore {
+
+ResourceHandleCFURLConnectionDelegate::ResourceHandleCFURLConnectionDelegate(ResourceHandle* handle)
+    : m_handle(handle)
+{
+}
+
+ResourceHandleCFURLConnectionDelegate::~ResourceHandleCFURLConnectionDelegate()
+{
+}
+
+CFURLRequestRef ResourceHandleCFURLConnectionDelegate::willSendRequestCallback(CFURLConnectionRef, CFURLRequestRef cfRequest, CFURLResponseRef originalRedirectResponse, const void* clientInfo)
+{
+    return static_cast&lt;ResourceHandleCFURLConnectionDelegate*&gt;(const_cast&lt;void*&gt;(clientInfo))-&gt;willSendRequest(cfRequest, originalRedirectResponse);
+}
+
+void ResourceHandleCFURLConnectionDelegate::didReceiveResponseCallback(CFURLConnectionRef, CFURLResponseRef cfResponse, const void* clientInfo)
+{
+    static_cast&lt;ResourceHandleCFURLConnectionDelegate*&gt;(const_cast&lt;void*&gt;(clientInfo))-&gt;didReceiveResponse(cfResponse);
+}
+
+void ResourceHandleCFURLConnectionDelegate::didReceiveDataCallback(CFURLConnectionRef, CFDataRef data, CFIndex originalLength, const void* clientInfo)
+{
+    static_cast&lt;ResourceHandleCFURLConnectionDelegate*&gt;(const_cast&lt;void*&gt;(clientInfo))-&gt;didReceiveData(data, originalLength);
+}
+
+void ResourceHandleCFURLConnectionDelegate::didFinishLoadingCallback(CFURLConnectionRef, const void* clientInfo)
+{
+    static_cast&lt;ResourceHandleCFURLConnectionDelegate*&gt;(const_cast&lt;void*&gt;(clientInfo))-&gt;didFinishLoading();
+}
+
+void ResourceHandleCFURLConnectionDelegate::didFailCallback(CFURLConnectionRef, CFErrorRef error, const void* clientInfo)
+{
+    static_cast&lt;ResourceHandleCFURLConnectionDelegate*&gt;(const_cast&lt;void*&gt;(clientInfo))-&gt;didFail(error);
+}
+
+CFCachedURLResponseRef ResourceHandleCFURLConnectionDelegate::willCacheResponseCallback(CFURLConnectionRef, CFCachedURLResponseRef cachedResponse, const void* clientInfo)
+{
+    return static_cast&lt;ResourceHandleCFURLConnectionDelegate*&gt;(const_cast&lt;void*&gt;(clientInfo))-&gt;willCacheResponse(cachedResponse);
+}
+
+void ResourceHandleCFURLConnectionDelegate::didReceiveChallengeCallback(CFURLConnectionRef, CFURLAuthChallengeRef challenge, const void* clientInfo)
+{
+    static_cast&lt;ResourceHandleCFURLConnectionDelegate*&gt;(const_cast&lt;void*&gt;(clientInfo))-&gt;didReceiveChallenge(challenge);
+}
+
+void ResourceHandleCFURLConnectionDelegate::didSendBodyDataCallback(CFURLConnectionRef, CFIndex, CFIndex totalBytesWritten, CFIndex totalBytesExpectedToWrite, const void *clientInfo)
+{
+    static_cast&lt;ResourceHandleCFURLConnectionDelegate*&gt;(const_cast&lt;void*&gt;(clientInfo))-&gt;didSendBodyData(totalBytesWritten, totalBytesExpectedToWrite);
+}
+
+Boolean ResourceHandleCFURLConnectionDelegate::shouldUseCredentialStorageCallback(CFURLConnectionRef, const void* clientInfo)
+{
+    return static_cast&lt;ResourceHandleCFURLConnectionDelegate*&gt;(const_cast&lt;void*&gt;(clientInfo))-&gt;shouldUseCredentialStorage();
+
+}
+
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
+Boolean ResourceHandleCFURLConnectionDelegate::canRespondToProtectionSpaceCallback(CFURLConnectionRef, CFURLProtectionSpaceRef protectionSpace, const void* clientInfo)
+{
+    return static_cast&lt;ResourceHandleCFURLConnectionDelegate*&gt;(const_cast&lt;void*&gt;(clientInfo))-&gt;canRespondToProtectionSpace(protectionSpace);
+}
+#endif // USE(PROTECTION_SPACE_AUTH_CALLBACK)
+
+#if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
+void ResourceHandleCFURLConnectionDelegate::didReceiveDataArrayCallback(CFURLConnectionRef, CFArrayRef dataArray, const void* clientInfo)
+{
+    static_cast&lt;ResourceHandleCFURLConnectionDelegate*&gt;(const_cast&lt;void*&gt;(clientInfo))-&gt;didReceiveDataArray(dataArray);
+}
+#endif // USE(NETWORK_CFDATA_ARRAY_CALLBACK)
+
+CFURLConnectionClient_V6 ResourceHandleCFURLConnectionDelegate::makeConnectionClient() const
+{
+    CFURLConnectionClient_V6 client = { 6, this, 0, 0, 0,
+        &amp;ResourceHandleCFURLConnectionDelegate::willSendRequestCallback,
+        &amp;ResourceHandleCFURLConnectionDelegate::didReceiveResponseCallback,
+        &amp;ResourceHandleCFURLConnectionDelegate::didReceiveDataCallback,
+        0,
+        &amp;ResourceHandleCFURLConnectionDelegate::didFinishLoadingCallback,
+        &amp;ResourceHandleCFURLConnectionDelegate::didFailCallback,
+        &amp;ResourceHandleCFURLConnectionDelegate::willCacheResponseCallback,
+        &amp;ResourceHandleCFURLConnectionDelegate::didReceiveChallengeCallback,
+        &amp;ResourceHandleCFURLConnectionDelegate::didSendBodyDataCallback,
+        &amp;ResourceHandleCFURLConnectionDelegate::shouldUseCredentialStorageCallback,
+        0,
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
+        &amp;ResourceHandleCFURLConnectionDelegate::canRespondToProtectionSpaceCallback,
+#else
+        0,
+#endif
+        0,
+#if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
+        &amp;ResourceHandleCFURLConnectionDelegate::didReceiveDataArrayCallback
+#else
+        0
+#endif
+    };
+    return client;
+}
+
+} // namespace WebCore.
+
+#endif // USE(CFNETWORK)
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfResourceHandleCFURLConnectionDelegateh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegate.h (0 => 160338)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegate.h                                (rev 0)
+++ trunk/Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegate.h        2013-12-09 23:45:03 UTC (rev 160338)
</span><span class="lines">@@ -0,0 +1,86 @@
</span><ins>+/*
+ * Copyright (C) 2004-2013 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 COMPUTER, 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 COMPUTER, 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.
+ */
+
+#ifndef ResourceHandleCFURLConnectionDelegate_h
+#define ResourceHandleCFURLConnectionDelegate_h
+
+#if USE(CFNETWORK)
+
+#include &lt;CFNetwork/CFURLConnectionPriv.h&gt;
+#include &lt;wtf/ThreadSafeRefCounted.h&gt;
+
+namespace WebCore {
+
+class ResourceHandle;
+
+class ResourceHandleCFURLConnectionDelegate : public ThreadSafeRefCounted&lt;ResourceHandleCFURLConnectionDelegate&gt; {
+public:
+    ResourceHandleCFURLConnectionDelegate(ResourceHandle*);
+    virtual ~ResourceHandleCFURLConnectionDelegate();
+
+    CFURLConnectionClient_V6 makeConnectionClient() const;
+
+private:
+    static CFURLRequestRef willSendRequestCallback(CFURLConnectionRef, CFURLRequestRef, CFURLResponseRef, const void* clientInfo);
+    static void didReceiveResponseCallback(CFURLConnectionRef, CFURLResponseRef, const void* clientInfo);
+    static void didReceiveDataCallback(CFURLConnectionRef, CFDataRef, CFIndex originalLength, const void* clientInfo);
+    static void didFinishLoadingCallback(CFURLConnectionRef, const void* clientInfo);
+    static void didFailCallback(CFURLConnectionRef, CFErrorRef, const void* clientInfo);
+    static CFCachedURLResponseRef willCacheResponseCallback(CFURLConnectionRef, CFCachedURLResponseRef, const void* clientInfo);
+    static void didReceiveChallengeCallback(CFURLConnectionRef, CFURLAuthChallengeRef, const void* clientInfo);
+    static void didSendBodyDataCallback(CFURLConnectionRef, CFIndex, CFIndex totalBytesWritten, CFIndex totalBytesExpectedToWrite, const void *clientInfo);
+    static Boolean shouldUseCredentialStorageCallback(CFURLConnectionRef, const void* clientInfo);
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
+    static Boolean canRespondToProtectionSpaceCallback(CFURLConnectionRef, CFURLProtectionSpaceRef, const void* clientInfo);
+#endif // USE(PROTECTION_SPACE_AUTH_CALLBACK)
+#if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
+    static void didReceiveDataArrayCallback(CFURLConnectionRef, CFArrayRef, const void* clientInfo);
+#endif // USE(NETWORK_CFDATA_ARRAY_CALLBACK)
+
+    virtual CFURLRequestRef willSendRequest(CFURLRequestRef, CFURLResponseRef) = 0;
+    virtual void didReceiveResponse(CFURLResponseRef) = 0;
+    virtual void didReceiveData(CFDataRef, CFIndex originalLength) = 0;
+    virtual void didFinishLoading() = 0;
+    virtual void didFail(CFErrorRef) = 0;
+    virtual CFCachedURLResponseRef willCacheResponse(CFCachedURLResponseRef) = 0;
+    virtual void didReceiveChallenge(CFURLAuthChallengeRef) = 0;
+    virtual void didSendBodyData(CFIndex totalBytesWritten, CFIndex totalBytesExpectedToWrite) = 0;
+    virtual Boolean shouldUseCredentialStorage() = 0;
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
+    virtual Boolean canRespondToProtectionSpace(CFURLProtectionSpaceRef) = 0;
+#endif // USE(PROTECTION_SPACE_AUTH_CALLBACK)
+#if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
+    virtual void didReceiveDataArray(CFArrayRef dataArray) = 0;
+#endif // USE(NETWORK_CFDATA_ARRAY_CALLBACK)
+
+protected:
+    ResourceHandle* m_handle;
+};
+
+} // namespace WebCore.
+
+#endif // USE(CFNETWORK)
+
+#endif // ResourceHandleCFURLConnectionDelegate_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfSynchronousResourceHandleCFURLConnectionDelegatecpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp (0 => 160338)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp                                (rev 0)
+++ trunk/Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp        2013-12-09 23:45:03 UTC (rev 160338)
</span><span class="lines">@@ -0,0 +1,306 @@
</span><ins>+/*
+ * Copyright (C) 2004-2013 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 COMPUTER, 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 COMPUTER, 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.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;SynchronousResourceHandleCFURLConnectionDelegate.h&quot;
+
+#if USE(CFNETWORK)
+
+#include &quot;AuthenticationCF.h&quot;
+#include &quot;AuthenticationChallenge.h&quot;
+#include &quot;FormDataStreamCFNet.h&quot;
+#include &quot;Logging.h&quot;
+#include &quot;NetworkingContext.h&quot;
+#include &quot;ResourceHandle.h&quot;
+#include &quot;ResourceHandleClient.h&quot;
+#include &quot;ResourceRequest.h&quot;
+#include &quot;ResourceResponse.h&quot;
+#include &quot;SharedBuffer.h&quot;
+#include &lt;wtf/RetainPtr.h&gt;
+#include &lt;wtf/text/CString.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+#if PLATFORM(MAC)
+#include &quot;WebCoreSystemInterface.h&quot;
+#include &quot;WebCoreURLResponse.h&quot;
+#endif // PLATFORM(MAC)
+
+#if PLATFORM(WIN)
+#include &quot;MIMETypeRegistry.h&quot;
+#include &lt;WebKitSystemInterface/WebKitSystemInterface.h&gt;
+#endif // PLATFORM(WIN)
+
+namespace WebCore {
+
+SynchronousResourceHandleCFURLConnectionDelegate::SynchronousResourceHandleCFURLConnectionDelegate(ResourceHandle* handle)
+    : ResourceHandleCFURLConnectionDelegate(handle)
+{
+}
+
+static RetainPtr&lt;CFURLResponseRef&gt; synthesizeRedirectResponseIfNecessary(const ResourceRequest&amp; currentRequest, CFURLRequestRef newRequest, CFURLResponseRef cfRedirectResponse)
+{
+    if (cfRedirectResponse)
+        return cfRedirectResponse;
+
+    CFURLRef newURL = CFURLRequestGetURL(newRequest);
+    RetainPtr&lt;CFStringRef&gt; newScheme = adoptCF(CFURLCopyScheme(newURL));
+
+    // If the protocols of the new request and the current request match, this is not an HSTS redirect and we shouldn't synthesize a redirect response.
+    if (currentRequest.url().protocol() == String(newScheme.get()))
+        return 0;
+
+    RetainPtr&lt;CFURLRef&gt; currentURL = currentRequest.url().createCFURL();
+    RetainPtr&lt;CFHTTPMessageRef&gt; responseMessage = adoptCF(CFHTTPMessageCreateResponse(0, 302, 0, kCFHTTPVersion1_1));
+    RetainPtr&lt;CFURLRef&gt; newAbsoluteURL = adoptCF(CFURLCopyAbsoluteURL(newURL));
+    CFHTTPMessageSetHeaderFieldValue(responseMessage.get(), CFSTR(&quot;Location&quot;), CFURLGetString(newAbsoluteURL.get()));
+    CFHTTPMessageSetHeaderFieldValue(responseMessage.get(), CFSTR(&quot;Cache-Control&quot;), CFSTR(&quot;no-store&quot;));
+
+    RetainPtr&lt;CFURLResponseRef&gt; newResponse = adoptCF(CFURLResponseCreateWithHTTPResponse(0, currentURL.get(), responseMessage.get(), kCFURLCacheStorageNotAllowed));
+    return newResponse;
+}
+
+CFURLRequestRef SynchronousResourceHandleCFURLConnectionDelegate::willSendRequest(CFURLRequestRef cfRequest, CFURLResponseRef originalRedirectResponse)
+{
+    RetainPtr&lt;CFURLResponseRef&gt; redirectResponse = synthesizeRedirectResponseIfNecessary(m_handle-&gt;currentRequest(), cfRequest, originalRedirectResponse);
+
+    if (!redirectResponse) {
+        CFRetain(cfRequest);
+        return cfRequest;
+    }
+
+    LOG(Network, &quot;CFNet - SynchronousResourceHandleCFURLConnectionDelegate::willSendRequest(handle=%p) (%s)&quot;, m_handle, m_handle-&gt;firstRequest().url().string().utf8().data());
+
+    ResourceRequest request;
+    CFHTTPMessageRef httpMessage = CFURLResponseGetHTTPResponse(redirectResponse.get());
+    if (httpMessage &amp;&amp; CFHTTPMessageGetResponseStatusCode(httpMessage) == 307) {
+        RetainPtr&lt;CFStringRef&gt; lastHTTPMethod = m_handle-&gt;lastHTTPMethod().createCFString();
+        RetainPtr&lt;CFStringRef&gt; newMethod = adoptCF(CFURLRequestCopyHTTPRequestMethod(cfRequest));
+        if (CFStringCompareWithOptions(lastHTTPMethod.get(), newMethod.get(), CFRangeMake(0, CFStringGetLength(lastHTTPMethod.get())), kCFCompareCaseInsensitive)) {
+            RetainPtr&lt;CFMutableURLRequestRef&gt; mutableRequest = adoptCF(CFURLRequestCreateMutableCopy(0, cfRequest));
+            wkSetRequestStorageSession(m_handle-&gt;storageSession(), mutableRequest.get());
+            CFURLRequestSetHTTPRequestMethod(mutableRequest.get(), lastHTTPMethod.get());
+
+            FormData* body = m_handle-&gt;firstRequest().httpBody();
+            if (!equalIgnoringCase(m_handle-&gt;firstRequest().httpMethod(), &quot;GET&quot;) &amp;&amp; body &amp;&amp; !body-&gt;isEmpty())
+                WebCore::setHTTPBody(mutableRequest.get(), body);
+
+            String originalContentType = m_handle-&gt;firstRequest().httpContentType();
+            if (!originalContentType.isEmpty())
+                CFURLRequestSetHTTPHeaderFieldValue(mutableRequest.get(), CFSTR(&quot;Content-Type&quot;), originalContentType.createCFString().get());
+
+            request = mutableRequest.get();
+        }
+    }
+    if (request.isNull())
+        request = cfRequest;
+
+    // Should not set Referer after a redirect from a secure resource to non-secure one.
+    if (!request.url().protocolIs(&quot;https&quot;) &amp;&amp; protocolIs(request.httpReferrer(), &quot;https&quot;) &amp;&amp; m_handle-&gt;context()-&gt;shouldClearReferrerOnHTTPSToHTTPRedirect())
+        request.clearHTTPReferrer();
+
+    m_handle-&gt;willSendRequest(request, redirectResponse.get());
+
+    if (request.isNull())
+        return 0;
+
+    cfRequest = request.cfURLRequest(UpdateHTTPBody);
+
+    CFRetain(cfRequest);
+    return cfRequest;
+}
+
+#if !PLATFORM(MAC)
+static void setDefaultMIMEType(CFURLResponseRef response)
+{
+    static CFStringRef defaultMIMETypeString = defaultMIMEType().createCFString().leakRef();
+    
+    CFURLResponseSetMIMEType(response, defaultMIMETypeString);
+}
+#endif // !PLATFORM(MAC)
+
+void SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse(CFURLResponseRef cfResponse)
+{
+    LOG(Network, &quot;CFNet - SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse(handle=%p) (%s)&quot;, m_handle, m_handle-&gt;firstRequest().url().string().utf8().data());
+
+    if (!m_handle-&gt;client())
+        return;
+
+#if PLATFORM(MAC)
+    // Avoid MIME type sniffing if the response comes back as 304 Not Modified.
+    CFHTTPMessageRef msg = wkGetCFURLResponseHTTPResponse(cfResponse);
+    int statusCode = msg ? CFHTTPMessageGetResponseStatusCode(msg) : 0;
+
+    if (statusCode != 304)
+        adjustMIMETypeIfNecessary(cfResponse);
+
+#if !PLATFORM(IOS)
+    if (_CFURLRequestCopyProtocolPropertyForKey(m_handle-&gt;firstRequest().cfURLRequest(DoNotUpdateHTTPBody), CFSTR(&quot;ForceHTMLMIMEType&quot;)))
+        wkSetCFURLResponseMIMEType(cfResponse, CFSTR(&quot;text/html&quot;));
+#endif // !PLATFORM(IOS)
+#else
+    if (!CFURLResponseGetMIMEType(cfResponse)) {
+        // We should never be applying the default MIMEType if we told the networking layer to do content sniffing for handle.
+        ASSERT(!m_handle-&gt;shouldContentSniff());
+        setDefaultMIMEType(cfResponse);
+    }
+#endif
+
+#if USE(QUICK_LOOK)
+    m_handle-&gt;setQuickLookHandle(QuickLookHandle::create(m_handle, this, cfResponse));
+    if (m_handle-&gt;quickLookHandle())
+        cfResponse = m_handle-&gt;quickLookHandle()-&gt;cfResponse();
+#endif
+
+    m_handle-&gt;client()-&gt;didReceiveResponse(m_handle, cfResponse);
+}
+
+void SynchronousResourceHandleCFURLConnectionDelegate::didReceiveData(CFDataRef data, CFIndex originalLength)
+{
+    LOG(Network, &quot;CFNet - SynchronousResourceHandleCFURLConnectionDelegate::didReceiveData(handle=%p, bytes=%ld) (%s)&quot;, m_handle, CFDataGetLength(data), m_handle-&gt;firstRequest().url().string().utf8().data());
+
+#if USE(QUICK_LOOK)
+    if (m_handle-&gt;quickLookHandle() &amp;&amp; m_handle-&gt;quickLookHandle()-&gt;didReceiveData(data))
+        return;
+#endif
+
+    if (ResourceHandleClient* client = m_handle-&gt;client())
+        client-&gt;didReceiveBuffer(m_handle, SharedBuffer::wrapCFData(data), originalLength);
+}
+
+void SynchronousResourceHandleCFURLConnectionDelegate::didFinishLoading()
+{
+    LOG(Network, &quot;CFNet - SynchronousResourceHandleCFURLConnectionDelegate::didFinishLoading(handle=%p) (%s)&quot;, m_handle, m_handle-&gt;firstRequest().url().string().utf8().data());
+
+#if USE(QUICK_LOOK)
+    if (m_handle-&gt;quickLookHandle() &amp;&amp; m_handle-&gt;quickLookHandle()-&gt;didFinishLoading())
+        return;
+#endif
+
+    if (ResourceHandleClient* client = m_handle-&gt;client())
+        client-&gt;didFinishLoading(m_handle, 0);
+}
+
+void SynchronousResourceHandleCFURLConnectionDelegate::didFail(CFErrorRef error)
+{
+    LOG(Network, &quot;CFNet - SynchronousResourceHandleCFURLConnectionDelegate::didFail(handle=%p, error = %p) (%s)&quot;, m_handle, error, m_handle-&gt;firstRequest().url().string().utf8().data());
+
+#if USE(QUICK_LOOK)
+    if (QuickLookHandle* quickLookHandle = m_handle-&gt;quickLookHandle())
+        quickLookHandle-&gt;didFail();
+#endif
+
+    if (ResourceHandleClient* client = m_handle-&gt;client())
+        client-&gt;didFail(m_handle, ResourceError(error));
+}
+
+CFCachedURLResponseRef SynchronousResourceHandleCFURLConnectionDelegate::willCacheResponse(CFCachedURLResponseRef cachedResponse)
+{
+#if PLATFORM(WIN)
+    // Workaround for &lt;rdar://problem/6300990&gt; Caching does not respect Vary HTTP header.
+    // FIXME: WebCore cache has issues with Vary, too (bug 58797, bug 71509).
+    CFURLResponseRef wrappedResponse = CFCachedURLResponseGetWrappedResponse(cachedResponse);
+    if (CFHTTPMessageRef httpResponse = CFURLResponseGetHTTPResponse(wrappedResponse)) {
+        ASSERT(CFHTTPMessageIsHeaderComplete(httpResponse));
+        RetainPtr&lt;CFStringRef&gt; varyValue = adoptCF(CFHTTPMessageCopyHeaderFieldValue(httpResponse, CFSTR(&quot;Vary&quot;)));
+        if (varyValue)
+            return 0;
+    }
+#endif // PLATFORM(WIN)
+
+#if PLATFORM(WIN)
+    if (m_handle-&gt;client() &amp;&amp; !m_handle-&gt;client()-&gt;shouldCacheResponse(m_handle, cachedResponse))
+        return 0;
+#else
+    CFCachedURLResponseRef newResponse = m_handle-&gt;client()-&gt;willCacheResponse(m_handle, cachedResponse);
+    if (newResponse != cachedResponse)
+        return newResponse;
+#endif
+
+    CFRetain(cachedResponse);
+    return cachedResponse;
+}
+
+void SynchronousResourceHandleCFURLConnectionDelegate::didReceiveChallenge(CFURLAuthChallengeRef challenge)
+{
+    LOG(Network, &quot;CFNet - SynchronousResourceHandleCFURLConnectionDelegate::didReceiveChallenge(handle=%p (%s)&quot;, m_handle, m_handle-&gt;firstRequest().url().string().utf8().data());
+
+    m_handle-&gt;didReceiveAuthenticationChallenge(AuthenticationChallenge(challenge, m_handle));
+}
+
+void SynchronousResourceHandleCFURLConnectionDelegate::didSendBodyData(CFIndex totalBytesWritten, CFIndex totalBytesExpectedToWrite)
+{
+    if (!m_handle || !m_handle-&gt;client())
+        return;
+    m_handle-&gt;client()-&gt;didSendData(m_handle, totalBytesWritten, totalBytesExpectedToWrite);
+}
+
+Boolean SynchronousResourceHandleCFURLConnectionDelegate::shouldUseCredentialStorage()
+{
+    LOG(Network, &quot;CFNet - SynchronousResourceHandleCFURLConnectionDelegate::shouldUseCredentialStorage(handle=%p) (%s)&quot;, m_handle, m_handle-&gt;firstRequest().url().string().utf8().data());
+
+    if (!m_handle)
+        return false;
+
+    return m_handle-&gt;shouldUseCredentialStorage();
+}
+
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
+Boolean SynchronousResourceHandleCFURLConnectionDelegate::canRespondToProtectionSpace(CFURLProtectionSpaceRef protectionSpace)
+{
+    ASSERT(m_handle);
+
+    LOG(Network, &quot;CFNet - SynchronousResourceHandleCFURLConnectionDelegate::canRespondToProtectionSpace(handle=%p (%s)&quot;, m_handle, m_handle-&gt;firstRequest().url().string().utf8().data());
+
+#if PLATFORM(IOS)
+    ProtectionSpace coreProtectionSpace = core(protectionSpace);
+    if (coreProtectionSpace.authenticationScheme() == ProtectionSpaceAuthenticationSchemeUnknown)
+        return false;
+    return m_handle-&gt;canAuthenticateAgainstProtectionSpace(coreProtectionSpace);
+#else
+    return m_handle-&gt;canAuthenticateAgainstProtectionSpace(core(protectionSpace));
+#endif
+}
+#endif // USE(PROTECTION_SPACE_AUTH_CALLBACK)
+
+#if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
+void SynchronousResourceHandleCFURLConnectionDelegate::didReceiveDataArray(CFArrayRef dataArray)
+{
+    if (!m_handle-&gt;client())
+        return;
+
+    LOG(Network, &quot;CFNet - SynchronousResourceHandleCFURLConnectionDelegate::didReceiveDataArray(handle=%p, arrayLength=%ld) (%s)&quot;, m_handle, CFArrayGetCount(dataArray), m_handle-&gt;firstRequest().url().string().utf8().data());
+
+#if USE(QUICK_LOOK)
+    if (m_handle-&gt;quickLookHandle() &amp;&amp; m_handle-&gt;quickLookHandle()-&gt;didReceiveDataArray(dataArray))
+        return;
+#endif
+
+    m_handle-&gt;handleDataArray(dataArray);
+}
+#endif // USE(NETWORK_CFDATA_ARRAY_CALLBACK)
+
+} // namespace WebCore.
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfSynchronousResourceHandleCFURLConnectionDelegateh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h (0 => 160338)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h                                (rev 0)
+++ trunk/Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h        2013-12-09 23:45:03 UTC (rev 160338)
</span><span class="lines">@@ -0,0 +1,62 @@
</span><ins>+/*
+ * Copyright (C) 2004-2013 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 COMPUTER, 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 COMPUTER, 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.
+ */
+
+#ifndef SynchronousResourceHandleCFURLConnectionDelegate_h
+#define SynchronousResourceHandleCFURLConnectionDelegate_h
+
+#if USE(CFNETWORK)
+
+#include &quot;ResourceHandleCFURLConnectionDelegate.h&quot;
+
+namespace WebCore {
+
+class SynchronousResourceHandleCFURLConnectionDelegate FINAL : public ResourceHandleCFURLConnectionDelegate {
+public:
+    SynchronousResourceHandleCFURLConnectionDelegate(ResourceHandle*);
+
+    virtual void didReceiveData(CFDataRef, CFIndex originalLength) OVERRIDE;
+    virtual void didFinishLoading() OVERRIDE;
+    virtual void didFail(CFErrorRef) OVERRIDE;
+#if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
+    virtual void didReceiveDataArray(CFArrayRef dataArray) OVERRIDE;
+#endif // USE(NETWORK_CFDATA_ARRAY_CALLBACK)
+
+private:
+    virtual CFURLRequestRef willSendRequest(CFURLRequestRef, CFURLResponseRef) OVERRIDE;
+    virtual void didReceiveResponse(CFURLResponseRef) OVERRIDE;
+    virtual CFCachedURLResponseRef willCacheResponse(CFCachedURLResponseRef) OVERRIDE;
+    virtual void didReceiveChallenge(CFURLAuthChallengeRef) OVERRIDE;
+    virtual void didSendBodyData(CFIndex totalBytesWritten, CFIndex totalBytesExpectedToWrite) OVERRIDE;
+    virtual Boolean shouldUseCredentialStorage() OVERRIDE;
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
+    virtual Boolean canRespondToProtectionSpace(CFURLProtectionSpaceRef) OVERRIDE;
+#endif // USE(PROTECTION_SPACE_AUTH_CALLBACK)
+};
+
+} // namespace WebCore.
+
+#endif // USE(CFNETWORK)
+
+#endif // ResourceHandleCFURLConnectionDelegate_h
</ins></span></pre>
</div>
</div>

</body>
</html>