2006-10-24 Anders Carlsson <acarlsson@apple.com>
authorandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Oct 2006 22:06:28 +0000 (22:06 +0000)
committerandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Oct 2006 22:06:28 +0000 (22:06 +0000)
        Fix the build (Update for changes to ResourceLoader)

        * platform/network/cf/ResourceLoaderCFNet.cpp:
        (WebCore::addHeadersFromHashMap):
        (WebCore::ResourceLoader::start):
        (WebCore::ResourceLoader::cancel):

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

WebCore/ChangeLog
WebCore/platform/network/cf/ResourceLoaderCFNet.cpp

index 5eb0b761724eb43d3e8f042c66c23e84f73b9335..84f8b995cf0332d519dc3654d9150508acdc3b10 100644 (file)
@@ -1,3 +1,12 @@
+2006-10-24  Anders Carlsson  <acarlsson@apple.com>
+
+        Fix the build (Update for changes to ResourceLoader)
+        
+        * platform/network/cf/ResourceLoaderCFNet.cpp:
+        (WebCore::addHeadersFromHashMap):
+        (WebCore::ResourceLoader::start):
+        (WebCore::ResourceLoader::cancel):
+
 2006-10-24  Sam Weinig  <sam.weinig@gmail.com>
 
         Reviewed by Mitz.
index 96de0832676ffdebae971d9b2977c8fb754e0a29..7c890783a108706e4abd9fcbf1da1f78330a98b6 100644 (file)
@@ -150,14 +150,14 @@ void didReceiveChallenge(CFURLConnectionRef conn, CFURLAuthChallengeRef challeng
     // Do nothing right now
 }
 
-void addHeadersFromHashMap(CFHTTPMessageRef request, const HashMap<String, String>& requestHeaders) 
+void addHeadersFromHashMap(CFHTTPMessageRef request, const ResourceRequest::HTTPHeaderMap& requestHeaders) 
 {
     if (!requestHeaders.size())
         return;
 
     CFMutableDictionaryRef allHeaders = CFDictionaryCreateMutable(0, requestHeaders.size(), &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
-    HashMap<String, String>::const_iterator end = requestHeaders.end();
-    for (HashMap<String, String>::const_iterator it = requestHeaders.begin(); it != end; ++it) {
+    ResourceRequest::HTTPHeaderMap::const_iterator end = requestHeaders.end();
+    for (ResourceRequest::HTTPHeaderMap::const_iterator it = requestHeaders.begin(); it != end; ++it) {
         CFStringRef key = it->first.createCFString();
         CFStringRef value = it->second.createCFString();
         CFDictionaryAddValue(allHeaders, key, value);
@@ -232,8 +232,8 @@ void runLoaderThread(void *unused)
 
 bool ResourceLoader::start(DocLoader* docLoader)
 {
-    CFURLRef url = d->URL.createCFURL();
-    CFStringRef requestMethod = d->method.createCFString();
+    CFURLRef url = d->m_request.url().createCFURL();
+    CFStringRef requestMethod = d->m_request.httpMethod().createCFString();
     Boolean isPost = CFStringCompare(requestMethod, CFSTR("POST"), kCFCompareCaseInsensitive);
     CFHTTPMessageRef httpRequest = CFHTTPMessageCreateRequest(0, requestMethod, url, kCFHTTPVersion1_1);
     CFStringRef userAgentString = docLoader->frame()->userAgent().createCFString();
@@ -243,7 +243,7 @@ bool ResourceLoader::start(DocLoader* docLoader)
 
     ref();
     d->m_loading = true;
-    addHeadersFromHashMap(httpRequest, d->m_requestHeaders);
+    addHeadersFromHashMap(httpRequest, d->m_request.httpHeaderFields());
 
     String referrer = docLoader->frame()->referrer();
     if (!referrer.isEmpty()) {
@@ -341,8 +341,8 @@ void ResourceLoader::cancel()
 
     // Copied directly from ResourceLoaderWin.cpp
     setError(1);
-    d->client->receivedAllData(this, 0);
-    d->client->didFinishLoading(this);
+    d->m_client->receivedAllData(this, 0);
+    d->m_client->didFinishLoading(this);
 }
 
 } // namespace WebCore