Set minimum priority for fast lane connections
[WebKit-https.git] / Source / WebCore / platform / network / cf / ResourceRequestCFNet.cpp
index 7a1dfd5..0a0bc7c 100644 (file)
@@ -29,6 +29,7 @@
 #include "ResourceRequest.h"
 
 #if PLATFORM(MAC)
+#include "ResourceLoadPriority.h"
 #include "WebCoreSystemInterface.h"
 #endif
 
@@ -195,6 +196,17 @@ void ResourceRequest::doUpdateResourceRequest()
     m_httpBody = httpBodyFromRequest(m_cfRequest.get());
 }
 
+#if USE(CFURLSTORAGESESSIONS)
+
+void ResourceRequest::setStorageSession(CFURLStorageSessionRef storageSession)
+{
+    CFMutableURLRequestRef cfRequest = CFURLRequestCreateMutableCopy(0, m_cfRequest.get());
+    wkSetRequestStorageSession(storageSession, cfRequest);
+    m_cfRequest.adoptCF(cfRequest);
+}
+
+#endif
+
 #endif // USE(CFNETWORK)
 
 unsigned initializeMaximumHTTPConnectionCountPerHost()
@@ -207,6 +219,8 @@ unsigned initializeMaximumHTTPConnectionCountPerHost()
 
 #if PLATFORM(MAC)
     if (isHTTPPipeliningEnabled()) {
+        wkSetHTTPPipeliningMaximumPriority(ResourceLoadPriorityHighest);
+        wkSetHTTPPipeliningMinimumFastLanePriority(ResourceLoadPriorityMedium);
         // When pipelining do not rate-limit requests sent from WebCore since CFNetwork handles that.
         return unlimitedConnectionCount;
     }