Commit 8ca237bb authored by psolanki@apple.com's avatar psolanki@apple.com

2011-01-03 Pratik Solanki <psolanki@apple.com>

        Reviewed by Darin Adler.

        https://bugs.webkit.org/show_bug.cgi?id=51850
        Put CFNetwork loader code inside USE(CFNETWORK)

        Add USE(CFNETWORK) macros around all the cf/mac network files. Also added all CFNetwork
        files to the WebCore Xcode project.

        * WebCore.xcodeproj/project.pbxproj:
        * loader/cf/ResourceLoaderCFNet.cpp:
        * loader/mac/ResourceLoaderMac.mm:
        * platform/network/cf/AuthenticationCF.cpp:
        * platform/network/cf/AuthenticationCF.h:
        * platform/network/cf/CookieJarCFNet.cpp:
        * platform/network/cf/CookieStorageCFNet.cpp:
        * platform/network/cf/CookieStorageCFNet.h:
        * platform/network/cf/CredentialStorageCFNet.cpp:
        * platform/network/cf/FormDataStreamCFNet.cpp:
        * platform/network/cf/FormDataStreamCFNet.h:
        * platform/network/cf/LoaderRunLoopCF.cpp:
        * platform/network/cf/LoaderRunLoopCF.h:
        * platform/network/cf/ResourceError.h:
        * platform/network/cf/ResourceHandleCFNet.cpp:
        * platform/network/cf/ResourceRequest.h:
        * platform/network/cf/ResourceRequestCFNet.cpp:
        * platform/network/cf/ResourceRequestCFNet.h:
        * platform/network/cf/ResourceResponse.h:
        * platform/network/cf/ResourceResponseCFNet.cpp:
        * platform/network/mac/AuthenticationMac.h:
        * platform/network/mac/AuthenticationMac.mm:
        * platform/network/mac/FormDataStreamMac.h:
        * platform/network/mac/FormDataStreamMac.mm:
        * platform/network/mac/ResourceError.h:
        * platform/network/mac/ResourceHandleMac.mm:
        * platform/network/mac/ResourceRequest.h:
        * platform/network/mac/ResourceRequestMac.mm:
        * platform/network/mac/ResourceResponse.h:
        * platform/network/mac/ResourceResponseMac.mm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74943 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3d6bfc32
2011-01-03 Pratik Solanki <psolanki@apple.com>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=51850
Put CFNetwork loader code inside USE(CFNETWORK)
Add USE(CFNETWORK) macros around all the cf/mac network files. Also added all CFNetwork
files to the WebCore Xcode project.
* WebCore.xcodeproj/project.pbxproj:
* loader/cf/ResourceLoaderCFNet.cpp:
* loader/mac/ResourceLoaderMac.mm:
* platform/network/cf/AuthenticationCF.cpp:
* platform/network/cf/AuthenticationCF.h:
* platform/network/cf/CookieJarCFNet.cpp:
* platform/network/cf/CookieStorageCFNet.cpp:
* platform/network/cf/CookieStorageCFNet.h:
* platform/network/cf/CredentialStorageCFNet.cpp:
* platform/network/cf/FormDataStreamCFNet.cpp:
* platform/network/cf/FormDataStreamCFNet.h:
* platform/network/cf/LoaderRunLoopCF.cpp:
* platform/network/cf/LoaderRunLoopCF.h:
* platform/network/cf/ResourceError.h:
* platform/network/cf/ResourceHandleCFNet.cpp:
* platform/network/cf/ResourceRequest.h:
* platform/network/cf/ResourceRequestCFNet.cpp:
* platform/network/cf/ResourceRequestCFNet.h:
* platform/network/cf/ResourceResponse.h:
* platform/network/cf/ResourceResponseCFNet.cpp:
* platform/network/mac/AuthenticationMac.h:
* platform/network/mac/AuthenticationMac.mm:
* platform/network/mac/FormDataStreamMac.h:
* platform/network/mac/FormDataStreamMac.mm:
* platform/network/mac/ResourceError.h:
* platform/network/mac/ResourceHandleMac.mm:
* platform/network/mac/ResourceRequest.h:
* platform/network/mac/ResourceRequestMac.mm:
* platform/network/mac/ResourceResponse.h:
* platform/network/mac/ResourceResponseMac.mm:
2011-01-03 Yi Shen <yi.4.shen@nokia.com>
Reviewed by Adam Barth.
......
This diff is collapsed.
......@@ -26,6 +26,8 @@
#include "config.h"
#include "ResourceLoader.h"
#if USE(CFNETWORK)
#include "FrameLoader.h"
#include "FrameLoaderClient.h"
......@@ -42,3 +44,5 @@ bool ResourceLoader::shouldCacheResponse(ResourceHandle*, CFCachedURLResponseRef
}
} // namespace WebCore
#endif // USE(CFNETWORK)
......@@ -29,6 +29,8 @@
#include "config.h"
#include "ResourceLoader.h"
#if !USE(CFNETWORK)
#include "FrameLoader.h"
#include "FrameLoaderClient.h"
#include "ResourceHandle.h"
......@@ -43,3 +45,5 @@ NSCachedURLResponse* ResourceLoader::willCacheResponse(ResourceHandle*, NSCached
}
}
#endif // !USE(CFNETWORK)
......@@ -26,6 +26,8 @@
#include "config.h"
#include "AuthenticationCF.h"
#if USE(CFNETWORK)
#include "AuthenticationChallenge.h"
#include "AuthenticationClient.h"
#include "Credential.h"
......@@ -265,3 +267,5 @@ ProtectionSpace core(CFURLProtectionSpaceRef cfSpace)
}
};
#endif // USE(CFNETWORK)
......@@ -26,6 +26,8 @@
#ifndef AuthenticationCF_h
#define AuthenticationCF_h
#if USE(CFNETWORK)
#include <CFNetwork/CFURLCredentialPriv.h>
typedef struct _CFURLAuthChallenge* CFURLAuthChallengeRef;
......@@ -46,4 +48,6 @@ ProtectionSpace core(CFURLProtectionSpaceRef);
}
#endif
#endif // USE(CFNETWORK)
#endif // AuthenticationCF_h
......@@ -26,6 +26,8 @@
#include "config.h"
#include "CookieJar.h"
#if USE(CFNETWORK)
#include "Cookie.h"
#include "CookieStorageCFNet.h"
#include "Document.h"
......@@ -184,4 +186,6 @@ void deleteCookie(const Document*, const KURL& url, const String& name)
}
}
}
} // namespace WebCore
#endif // USE(CFNETWORK)
......@@ -26,6 +26,8 @@
#include "config.h"
#include "CookieStorageCFNet.h"
#if USE(CFNETWORK)
#include <CFNetwork/CFHTTPCookiesPriv.h>
#include <WebKitSystemInterface/WebKitSystemInterface.h>
#include <wtf/MainThread.h>
......@@ -61,4 +63,6 @@ void setCookieStoragePrivateBrowsingEnabled(bool enabled)
s_cookieStorage = 0;
}
}
} // namespace WebCore
#endif // USE(CFNETWORK)
......@@ -26,6 +26,8 @@
#ifndef CookieStorageCFNet_h
#define CookieStorageCFNet_h
#if USE(CFNETWORK)
typedef struct OpaqueCFHTTPCookieStorage* CFHTTPCookieStorageRef;
namespace WebCore {
......@@ -37,4 +39,6 @@ namespace WebCore {
}
#endif // CookieStorageCFNet_h
#endif // USE(CFNETWORK)
#endif // CookieStorageCFNet_h
......@@ -26,6 +26,8 @@
#include "config.h"
#include "CredentialStorage.h"
#if USE(CFNETWORK)
#include "AuthenticationCF.h"
#include "Credential.h"
#include "ProtectionSpace.h"
......@@ -42,3 +44,5 @@ Credential CredentialStorage::getFromPersistentStorage(const ProtectionSpace& pr
}
} // namespace WebCore
#endif // USE(CFNETWORK)
......@@ -31,6 +31,8 @@
#include "config.h"
#include "FormDataStreamCFNet.h"
#if USE(CFNETWORK)
#include "FileSystem.h"
#include "FormData.h"
#include <CFNetwork/CFURLRequestPriv.h>
......@@ -381,4 +383,6 @@ PassRefPtr<FormData> httpBodyFromRequest(CFURLRequestRef request)
return 0;
}
}
} // namespace WebCore
#endif // USE(CFNETWORK)
......@@ -29,6 +29,8 @@
#ifndef FormDataStreamCFNet_h
#define FormDataStreamCFNet_h
#if USE(CFNETWORK)
#include <CoreFoundation/CoreFoundation.h>
#include <wtf/Forward.h>
......@@ -41,4 +43,6 @@ namespace WebCore {
PassRefPtr<FormData> httpBodyFromRequest(CFURLRequestRef);
}
#endif FormDataStreamCFNet_h
#endif // USE(CFNETWORK)
#endif // FormDataStreamCFNet_h
......@@ -26,6 +26,8 @@
#include "config.h"
#include "LoaderRunLoopCF.h"
#if USE(CFNETWORK)
#include <wtf/Threading.h>
namespace WebCore {
......@@ -63,4 +65,6 @@ CFRunLoopRef loaderRunLoop()
return loaderRunLoopObject;
}
}
} // namespace WebCore
#endif // USE(CFNETWORK)
......@@ -26,6 +26,8 @@
#ifndef LoaderRunLoopCF_h
#define LoaderRunLoopCF_h
#if USE(CFNETWORK)
#if !PLATFORM(WIN)
#error This code is not needed on platforms other than Windows, because main thread's CFRunLoop can be used.
#endif
......@@ -36,4 +38,6 @@ CFRunLoopRef loaderRunLoop();
}
#endif // USE(CFNETWORK)
#endif // LoaderRunLoop_h
......@@ -26,6 +26,8 @@
#ifndef ResourceError_h
#define ResourceError_h
#if USE(CFNETWORK)
#include "ResourceErrorBase.h"
#include <wtf/RetainPtr.h>
......@@ -70,4 +72,6 @@ private:
} // namespace WebCore
#endif // USE(CFNETWORK)
#endif // ResourceError_h
......@@ -25,6 +25,8 @@
#include "config.h"
#if USE(CFNETWORK)
#include "ResourceHandle.h"
#include "ResourceHandleClient.h"
#include "ResourceHandleInternal.h"
......@@ -767,3 +769,5 @@ bool WebCoreSynchronousLoaderClient::shouldUseCredentialStorage(ResourceHandle*)
}
} // namespace WebCore
#endif // USE(CFNETWORK)
......@@ -27,6 +27,8 @@
#ifndef ResourceRequest_h
#define ResourceRequest_h
#if USE(CFNETWORK)
#include "ResourceRequestBase.h"
#include <wtf/RetainPtr.h>
......@@ -80,4 +82,6 @@ namespace WebCore {
} // namespace WebCore
#endif // USE(CFNETWORK)
#endif // ResourceRequest_h
......@@ -26,6 +26,8 @@
#include "config.h"
#include "ResourceRequestCFNet.h"
#if USE(CFNETWORK)
#include "FormDataStreamCFNet.h"
#include "ResourceRequest.h"
......@@ -193,4 +195,6 @@ unsigned initializeMaximumHTTPConnectionCountPerHost()
return wkInitializeMaximumHTTPConnectionCountPerHost(preferredConnectionCount);
}
}
} // namespace WebCore
#endif // USE(CFNETWORK)
......@@ -26,6 +26,8 @@
#ifndef ResourceRequestCFNet_h
#define ResourceRequestCFNet_h
#if USE(CFNETWORK)
typedef const struct _CFURLRequest* CFURLRequestRef;
namespace WebCore {
......@@ -36,4 +38,6 @@ namespace WebCore {
CFURLRequestRef cfURLRequest(const ResourceRequest&);
}
#endif // USE(CFNETWORK)
#endif // ResourceRequestCFNet_h
......@@ -26,6 +26,8 @@
#ifndef ResourceResponse_h
#define ResourceResponse_h
#if USE(CFNETWORK)
#include "ResourceResponseBase.h"
#include <wtf/RetainPtr.h>
......@@ -85,4 +87,6 @@ struct CrossThreadResourceResponseData : public CrossThreadResourceResponseDataB
} // namespace WebCore
#endif // USE(CFNETWORK)
#endif // ResourceResponse_h
......@@ -26,6 +26,8 @@
#include "config.h"
#include "ResourceResponse.h"
#if USE(CFNETWORK)
#include "HTTPParsers.h"
#include "MIMETypeRegistry.h"
#include <CFNetwork/CFURLResponsePriv.h>
......@@ -113,4 +115,6 @@ bool ResourceResponse::platformCompare(const ResourceResponse& a, const Resource
}
}
} // namespace WebCore
#endif // USE(CFNETWORK)
......@@ -25,6 +25,8 @@
#ifndef AuthenticationMac_h
#define AuthenticationMac_h
#if !USE(CFNETWORK)
#ifdef __OBJC__
@class NSURLAuthenticationChallenge;
......@@ -46,6 +48,8 @@ ProtectionSpace core(NSURLProtectionSpace *);
Credential core(NSURLCredential *);
}
#endif
#endif // __OBJC__
#endif // !USE(CFNETWORK)
#endif
#endif // AuthenticationMac_h
......@@ -25,6 +25,8 @@
#import "config.h"
#import "AuthenticationMac.h"
#if !USE(CFNETWORK)
#import "AuthenticationChallenge.h"
#import "AuthenticationClient.h"
#import "Credential.h"
......@@ -357,4 +359,6 @@ Credential core(NSURLCredential *macCredential)
return Credential([macCredential user], [macCredential password], persistence);
}
};
} // namespace WebCore
#endif // !USE(CFNETWORK)
......@@ -29,6 +29,8 @@
#ifndef FormDataStreamMac_h
#define FormDataStreamMac_h
#if !USE(CFNETWORK)
#include "FormData.h"
@class NSMutableURLRequest;
......@@ -46,4 +48,6 @@ namespace WebCore {
} // namespace WebCore
#endif // !USE(CFNETWORK)
#endif // FormDataStreamMac_h
......@@ -31,6 +31,8 @@
#import "config.h"
#import "FormDataStreamMac.h"
#if !USE(CFNETWORK)
#import "BlobRegistryImpl.h"
#import "FileSystem.h"
#import "FormData.h"
......@@ -484,3 +486,5 @@ FormData* httpBodyFromStream(NSInputStream* stream)
}
} // namespace WebCore
#endif // !USE(CFNETWORK)
......@@ -26,6 +26,8 @@
#ifndef ResourceError_h
#define ResourceError_h
#if !USE(CFNETWORK)
#include "ResourceErrorBase.h"
#include <wtf/RetainPtr.h>
......@@ -71,4 +73,6 @@ namespace WebCore {
} // namespace WebCore
#endif // !USE(CFNETWORK)
#endif // ResourceError_h_
......@@ -26,6 +26,8 @@
#import "config.h"
#import "ResourceHandleInternal.h"
#if !USE(CFNETWORK)
#import "AuthenticationChallenge.h"
#import "AuthenticationMac.h"
#import "Base64.h"
......@@ -1074,4 +1076,6 @@ void WebCoreSynchronousLoaderClient::didFail(ResourceHandle*, const ResourceErro
m_isDone = true;
}
#endif
#endif // BUILDING_ON_TIGER
#endif // !USE(CFNETWORK)
......@@ -27,6 +27,8 @@
#ifndef ResourceRequest_h
#define ResourceRequest_h
#if !USE(CFNETWORK)
#include "ResourceRequestBase.h"
#include <wtf/RetainPtr.h>
......@@ -85,4 +87,6 @@ namespace WebCore {
} // namespace WebCore
#endif // !USE(CFNETWORK)
#endif // ResourceRequest_h
......@@ -25,6 +25,9 @@
#import "config.h"
#import "ResourceRequest.h"
#if !USE(CFNETWORK)
#import "WebCoreSystemInterface.h"
#import "FormDataStreamMac.h"
......@@ -158,4 +161,6 @@ unsigned initializeMaximumHTTPConnectionCountPerHost()
return wkInitializeMaximumHTTPConnectionCountPerHost(preferredConnectionCount);
}
}
} // namespace WebCore
#endif // !USE(CFNETWORK)
......@@ -26,6 +26,8 @@
#ifndef ResourceResponse_h
#define ResourceResponse_h
#if !USE(CFNETWORK)
#include "ResourceResponseBase.h"
#include <wtf/RetainPtr.h>
......@@ -90,4 +92,6 @@ struct CrossThreadResourceResponseData : public CrossThreadResourceResponseDataB
} // namespace WebCore
#endif // !USE(CFNETWORK)
#endif // ResourceResponse_h
......@@ -26,6 +26,8 @@
#import "config.h"
#import "ResourceResponse.h"
#if !USE(CFNETWORK)
#import "HTTPParsers.h"
#import "WebCoreURLResponse.h"
#import "WebCoreSystemInterface.h"
......@@ -106,4 +108,6 @@ bool ResourceResponse::platformCompare(const ResourceResponse& a, const Resource
return a.nsURLResponse() == b.nsURLResponse();
}
}
} // namespace WebCore
#endif // !USE(CFNETWORK)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment