LayoutTests:
[WebKit-https.git] / WebCore / platform / network / ResourceHandle.cpp
index bd85ee1..8f65792 100644 (file)
 #include "ResourceHandle.h"
 #include "ResourceHandleInternal.h"
 
-#include "LoaderFunctions.h"
 #include "Logging.h"
 
 namespace WebCore {
 
-ResourceHandle::ResourceHandle(const ResourceRequest& request, ResourceHandleClient* client)
-    : d(new ResourceHandleInternal(this, request, client))
+ResourceHandle::ResourceHandle(const ResourceRequest& request, ResourceHandleClient* client, bool mightDownloadFromHandle)
+    : d(new ResourceHandleInternal(this, request, client, mightDownloadFromHandle))
 {
 }
 
-PassRefPtr<ResourceHandle> ResourceHandle::create(const ResourceRequest& request, ResourceHandleClient* client, DocLoader* dl)
+PassRefPtr<ResourceHandle> ResourceHandle::create(const ResourceRequest& request, ResourceHandleClient* client, Frame* frame, bool mightDownloadFromHandle)
 {
-    RefPtr<ResourceHandle> newLoader(new ResourceHandle(request, client));
+    RefPtr<ResourceHandle> newLoader(new ResourceHandle(request, client, mightDownloadFromHandle));
     
-    if (newLoader->start(dl))
+    if (newLoader->start(frame))
         return newLoader.release();
 
     return 0;
@@ -72,4 +71,18 @@ ResourceHandleClient* ResourceHandle::client() const
     return d->m_client;
 }
 
+const ResourceRequest& ResourceHandle::request() const
+{
+    return d->m_request;
+}
+
+void ResourceHandle::clearAuthentication()
+{
+#if PLATFORM(MAC)
+    d->m_currentMacChallenge = nil;
+#endif
+    d->m_currentWebChallenge.nullify();
+}
+
 } // namespace WebCore
+