Reviewed by Maciej.
authorandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Dec 2006 02:09:30 +0000 (02:09 +0000)
committerandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Dec 2006 02:09:30 +0000 (02:09 +0000)
        General cleanup, get rid of PlatformResponse (we have ResourceResponse now)
        and remove a couple of functions that were unused.

        * loader/CachedResource.h:
        * loader/LoaderFunctions.h:
        * loader/mac/LoaderFunctionsMac.mm:
        * platform/network/ResourceHandle.h:
        * platform/network/ResourceHandleClient.h:
        * platform/network/mac/ResourceHandleMac.mm:
        (WebCore::ResourceHandle::~ResourceHandle):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@18039 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/loader/CachedResource.h
WebCore/loader/LoaderFunctions.h
WebCore/loader/mac/LoaderFunctionsMac.mm
WebCore/platform/network/ResourceHandle.h
WebCore/platform/network/ResourceHandleClient.h
WebCore/platform/network/mac/ResourceHandleMac.mm

index 3f725fbbb922f6278042fa7a0aa2a4034824f213..e297ff648f5058046e5b9a181cc096d50ab77f66 100644 (file)
@@ -1,3 +1,18 @@
+2006-12-05  Anders Carlsson  <acarlsson@apple.com>
+
+        Reviewed by Maciej.
+
+        General cleanup, get rid of PlatformResponse (we have ResourceResponse now)
+        and remove a couple of functions that were unused.
+
+        * loader/CachedResource.h:
+        * loader/LoaderFunctions.h:
+        * loader/mac/LoaderFunctionsMac.mm:
+        * platform/network/ResourceHandle.h:
+        * platform/network/ResourceHandleClient.h:
+        * platform/network/mac/ResourceHandleMac.mm:
+        (WebCore::ResourceHandle::~ResourceHandle):
+
 2006-12-05  Kevin McCullough  <kmccullough@apple.com>
 
         Reviewed by John.
index e0f980aec1e86a7d0f80ce42138c0247dca1f670..aa820dd5b9e19013a68b69df0981dad03776c3c5 100644 (file)
@@ -30,7 +30,7 @@
 
 #include "CachePolicy.h"
 #include "PlatformString.h"
-#include "ResourceHandleClient.h" // defines PlatformResponse and PlatformData
+#include "ResourceHandleClient.h" // defines PlatformData
 #include "ResourceResponse.h"
 #include <wtf/HashSet.h>
 #include <wtf/Vector.h>
index 0b78adf93e9a88cb95cc501af0b0d0b0e1332497..27b1d9bc0d399d6b95848ae7da31c3abbe1c5cdd 100644 (file)
@@ -26,7 +26,6 @@
 #include <wtf/Vector.h>
 #include <wtf/HashMap.h>
 #include "PlatformString.h"
-#include "ResourceHandleClient.h"  // Defines PlatformResponse
 #include "HTTPHeaderMap.h"
 
 #ifdef __OBJC__
@@ -50,6 +49,7 @@ class DocLoader;
 class Loader;
 class Request;
 class ResourceRequest;
+class ResourceResponse;
 
 Vector<char> ServeSynchronousRequest(Loader*, DocLoader*, const ResourceRequest&, ResourceResponse&);
 
index 9254967dcf276e22410f3124f574ff25a61038d4..befa9ddb4f5a9bfc5d5f7003b2735a72b32baf9b 100644 (file)
@@ -145,54 +145,6 @@ void CheckCacheObjectStatus(DocLoader *loader, CachedResource *cachedResource)
     frame->loader()->didTellBridgeAboutLoad(cachedResource->url());
 }
 
-bool IsResponseURLEqualToURL(PlatformResponse response, const String& m_url)
-{
-    NSURL *responseURL = [(NSURLResponse *)response URL];
-    NSString *urlString = [responseURL absoluteString];
-
-    size_t length = m_url.length();
-    if (length != [urlString length])
-        return false;
-
-    Vector<UChar, 1024> buffer(length);
-    [urlString getCharacters:buffer.data()];    
-    return !memcmp(buffer.data(), m_url.characters(), length * sizeof(UChar));
-}
-
-DeprecatedString ResponseURL(PlatformResponse response)
-{
-    BEGIN_BLOCK_OBJC_EXCEPTIONS;
-
-    NSURL *responseURL = [(NSURLResponse *)response URL];
-    NSString *urlString = [responseURL absoluteString];
-    
-    DeprecatedString string;
-    string.setBufferFromCFString((CFStringRef)urlString);
-    return string;
-
-    END_BLOCK_OBJC_EXCEPTIONS;
-    
-    return NULL;
-}
-
-DeprecatedString ResponseMIMEType(PlatformResponse response)
-{
-    BEGIN_BLOCK_OBJC_EXCEPTIONS;
-    return DeprecatedString::fromNSString([(NSURLResponse *)response MIMEType]);
-    END_BLOCK_OBJC_EXCEPTIONS;
-
-    return DeprecatedString();
-}
-
-bool ResponseIsMultipart(PlatformResponse response)
-{
-    BEGIN_BLOCK_OBJC_EXCEPTIONS;
-    return [[response MIMEType] isEqualToString:@"multipart/x-mixed-replace"];
-    END_BLOCK_OBJC_EXCEPTIONS;
-    
-    return false;
-}
-
 void CachedResource::setAllData(PlatformData allData)
 {
     HardRetain(allData);
index 24471cc4a2579f9ea2fd928b6af0f4bc311ed31e..f833782dfc9547129307f17c6978fbe4c24b0947 100644 (file)
@@ -26,8 +26,9 @@
 #ifndef ResourceHandle_h
 #define ResourceHandle_h
 
+#include <wtf/OwnPtr.h>
+
 #include "HTTPHeaderMap.h"
-#include "ResourceHandleClient.h" // for PlatformResponse
 
 #if PLATFORM(WIN)
 typedef unsigned long DWORD;
@@ -43,13 +44,15 @@ typedef LONG_PTR LRESULT;
 
 #if PLATFORM(MAC)
 #ifdef __OBJC__
+@class NSData;
+@class NSError;
 @class NSURLRequest;
 @class NSURLResponse;
-@class NSError;
 #else
+class NSData;
+class NSError;
 class NSURLRequest;
 class NSURLResponse;
-class NSError;
 #endif
 #endif
 
@@ -58,6 +61,7 @@ namespace WebCore {
 class DocLoader;
 class FormData;
 class KURL;
+class ResourceHandleClient;
 class ResourceHandleInternal;
 class SubresourceLoader;
 class SubresourceLoaderClient;
@@ -116,7 +120,7 @@ public:
 private:
     bool start(DocLoader*);
 
-    ResourceHandleInternal* d;
+    OwnPtr<ResourceHandleInternal> d;
 };
 
 }
index fda64cfa4c0133a8374163396efc902865fa1192..1d0f43d3d73adc1b5fe4073d27fbb9170cd2d897 100644 (file)
@@ -69,7 +69,6 @@ namespace WebCore {
 #else
     // Not sure what the strategy for this will be on other platforms.
     typedef struct PlatformDataStruct* PlatformData;
-    typedef struct PlatformResponseStruct* PlatformResponse;
 #endif
 
     class KURL;
index 83bfa8df0cc1ac2d567fd6722e5b1e53a65cea08..0993e1b42ec164f8a79107e001665aa196ac7fc2 100644 (file)
@@ -43,7 +43,6 @@ ResourceHandleInternal::~ResourceHandleInternal()
 
 ResourceHandle::~ResourceHandle()
 {
-    delete d;
 }
 
 bool ResourceHandle::start(DocLoader* docLoader)