Changeset 86414 in webkit
- Timestamp:
- May 12, 2011 10:37:59 PM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r86413 r86414 1 2011-05-12 Pratik Solanki <psolanki@apple.com> 2 3 Reviewed by Antti Koivisto. 4 5 Part of WebCore should use CFNetwork-based loader on Mac 6 https://bugs.webkit.org/show_bug.cgi?id=51836 7 8 Implement mac specific Authentication functions when using CFNetwork. 9 10 * WebCore.exp.in: 11 * WebCore.xcodeproj/project.pbxproj: 12 * platform/network/ResourceHandle.h: 13 * platform/network/cf/AuthenticationCF.cpp: 14 (WebCore::AuthenticationChallenge::authenticationClient): 15 (WebCore::createCF): 16 (WebCore::core): 17 * platform/network/cf/AuthenticationCF.h: 18 * platform/network/cf/AuthenticationChallenge.h: 19 * platform/network/mac/AuthenticationMac.mm: 20 (WebCore::core): 21 (WebCore::mac): 22 * platform/network/mac/CredentialStorageMac.mm: 23 1 24 2011-05-12 Ben Wells <benwells@chromium.org> 2 25 -
trunk/Source/WebCore/WebCore.exp.in
r86407 r86414 1653 1653 #endif 1654 1654 1655 #if USE(PROTECTION_SPACE_AUTH_CALLBACK) && USE(CFNETWORK) 1656 __ZN7WebCore8createCFERKNS_15ProtectionSpaceE 1657 #endif 1658 1655 1659 #if ENABLE(SVG_ANIMATION) && ENABLE(SVG_DOM_OBJC_BINDINGS) 1656 1660 .objc_class_name_DOMSVGAnimateElement -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r86359 r86414 1643 1643 7E37EF2E1339208800B29250 /* SubresourceLoaderCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7E37EF2D1339208800B29250 /* SubresourceLoaderCF.cpp */; }; 1644 1644 7EE6845F12D26E3800E79415 /* AuthenticationCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7EE6844C12D26E3800E79415 /* AuthenticationCF.cpp */; }; 1645 7EE6846012D26E3800E79415 /* AuthenticationCF.h in Headers */ = {isa = PBXBuildFile; fileRef = 7EE6844D12D26E3800E79415 /* AuthenticationCF.h */; };1645 7EE6846012D26E3800E79415 /* AuthenticationCF.h in Headers */ = {isa = PBXBuildFile; fileRef = 7EE6844D12D26E3800E79415 /* AuthenticationCF.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1646 1646 7EE6846112D26E3800E79415 /* AuthenticationChallenge.h in Headers */ = {isa = PBXBuildFile; fileRef = 7EE6844E12D26E3800E79415 /* AuthenticationChallenge.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1647 1647 7EE6846212D26E3800E79415 /* CookieJarCFNet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7EE6844F12D26E3800E79415 /* CookieJarCFNet.cpp */; }; -
trunk/Source/WebCore/platform/network/ResourceHandle.h
r86285 r86414 123 123 #endif 124 124 125 #if PLATFORM(MAC) 125 #if PLATFORM(MAC) && !USE(CFNETWORK) 126 126 void didCancelAuthenticationChallenge(const AuthenticationChallenge&); 127 127 #if USE(PROTECTION_SPACE_AUTH_CALLBACK) … … 132 132 void releaseDelegate(); 133 133 id releaseProxy(); 134 134 #endif 135 136 #if PLATFORM(MAC) 135 137 void schedule(SchedulePair*); 136 138 void unschedule(SchedulePair*); 137 #elif USE(CFNETWORK) 139 #endif 140 #if USE(CFNETWORK) 138 141 CFURLConnectionRef connection() const; 139 142 CFURLConnectionRef releaseConnectionForDownload(); -
trunk/Source/WebCore/platform/network/cf/AuthenticationCF.cpp
r79557 r86414 69 69 } 70 70 71 AuthenticationClient* AuthenticationChallenge::authenticationClient() const 72 { 73 return m_authenticationClient.get(); 74 } 75 71 76 bool AuthenticationChallenge::platformCompare(const AuthenticationChallenge& a, const AuthenticationChallenge& b) 72 77 { … … 171 176 scheme = kCFURLProtectionSpaceAuthenticationSchemeNegotiate; 172 177 break; 178 #if USE(PROTECTION_SPACE_AUTH_CALLBACK) 179 case ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested: 180 scheme = kCFURLProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested; 181 break; 182 case ProtectionSpaceAuthenticationSchemeClientCertificateRequested: 183 scheme = kCFURLProtectionSpaceAuthenticationSchemeClientCertificateRequested; 184 break; 185 #endif 173 186 default: 174 187 ASSERT_NOT_REACHED(); … … 259 272 scheme = ProtectionSpaceAuthenticationSchemeNegotiate; 260 273 break; 274 #if USE(PROTECTION_SPACE_AUTH_CALLBACK) 275 case kCFURLProtectionSpaceAuthenticationSchemeClientCertificateRequested: 276 scheme = ProtectionSpaceAuthenticationSchemeClientCertificateRequested; 277 break; 278 case kCFURLProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested: 279 scheme = ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested; 280 break; 281 #endif 261 282 default: 262 283 scheme = ProtectionSpaceAuthenticationSchemeUnknown; -
trunk/Source/WebCore/platform/network/cf/AuthenticationCF.h
r74943 r86414 29 29 #if USE(CFNETWORK) 30 30 31 #ifdef __OBJC__ 32 @class NSURLAuthenticationChallenge; 33 @class NSURLCredential; 34 @class NSURLProtectionSpace; 35 #else 36 class NSURLAuthenticationChallenge; 37 class NSURLCredential; 38 class NSURLProtectionSpace; 39 #endif 40 31 41 #include <CFNetwork/CFURLCredentialPriv.h> 32 42 … … 44 54 CFURLProtectionSpaceRef createCF(const ProtectionSpace&); 45 55 56 #if PLATFORM(MAC) 57 AuthenticationChallenge core(CFURLAuthChallengeRef); 58 #endif 46 59 Credential core(CFURLCredentialRef); 47 60 ProtectionSpace core(CFURLProtectionSpaceRef); 61 62 #if PLATFORM(MAC) 63 AuthenticationChallenge core(NSURLAuthenticationChallenge *); 64 Credential core(NSURLCredential *); 65 ProtectionSpace core(NSURLProtectionSpace*); 66 67 NSURLAuthenticationChallenge *mac(const AuthenticationChallenge&); 68 NSURLCredential *mac(const Credential&); 69 NSURLProtectionSpace *mac(const ProtectionSpace&); 70 #endif 48 71 49 72 } -
trunk/Source/WebCore/platform/network/cf/AuthenticationChallenge.h
r75103 r86414 51 51 AuthenticationChallenge(CFURLAuthChallengeRef, AuthenticationClient*); 52 52 53 AuthenticationClient* authenticationClient() const { return m_authenticationClient.get(); }53 AuthenticationClient* authenticationClient() const; 54 54 void setAuthenticationClient(AuthenticationClient* client) { m_authenticationClient = client; } 55 55 -
trunk/Source/WebCore/platform/network/mac/AuthenticationMac.mm
r85036 r86414 26 26 #import "AuthenticationMac.h" 27 27 28 #if !USE(CFNETWORK) 29 28 #import "AuthenticationCF.h" 30 29 #import "AuthenticationChallenge.h" 31 30 #import "AuthenticationClient.h" … … 36 35 #import <Foundation/NSURLCredential.h> 37 36 #import <Foundation/NSURLProtectionSpace.h> 37 38 #if USE(CFNETWORK) 39 40 @interface NSURLProtectionSpace (Details) 41 - (CFURLProtectionSpaceRef) _cfurlprotectionspace; 42 - (id)_initWithCFURLProtectionSpace:(CFURLProtectionSpaceRef)cfProtSpace; 43 @end 44 45 @interface NSURLAuthenticationChallenge (Details) 46 -(CFURLAuthChallengeRef)_createCFAuthChallenge; 47 +(NSURLAuthenticationChallenge *)_authenticationChallengeForCFAuthChallenge:(CFURLAuthChallengeRef)cfChallenge sender:(id <NSURLAuthenticationChallengeSender>)sender; 48 @end 49 50 @interface NSURLCredential (Details) 51 - (id) _initWithCFURLCredential:(CFURLCredentialRef)credential; 52 - (CFURLCredentialRef) _cfurlcredential; 53 @end 54 55 #endif 38 56 39 57 using namespace WebCore; … … 90 108 91 109 namespace WebCore { 110 111 #if USE(CFNETWORK) 112 113 AuthenticationChallenge core(NSURLAuthenticationChallenge *macChallenge) 114 { 115 WebCoreAuthenticationClientAsChallengeSender *challengeSender = (WebCoreAuthenticationClientAsChallengeSender*) [macChallenge sender]; 116 AuthenticationClient* authClient = [challengeSender client]; 117 return AuthenticationChallenge([macChallenge _createCFAuthChallenge], authClient); 118 } 119 120 Credential core(NSURLCredential *macCredential) 121 { 122 return core([macCredential _cfurlcredential]); 123 } 124 125 ProtectionSpace core(NSURLProtectionSpace *macSpace) 126 { 127 return core([macSpace _cfurlprotectionspace]); 128 } 129 130 NSURLProtectionSpace *mac(const ProtectionSpace& coreSpace) 131 { 132 RetainPtr<CFURLProtectionSpaceRef> protectionSpace(AdoptCF, createCF(coreSpace)); 133 return [[[NSURLProtectionSpace alloc] _initWithCFURLProtectionSpace:protectionSpace.get()] autorelease]; 134 } 135 136 NSURLAuthenticationChallenge *mac(const AuthenticationChallenge& coreChallenge) 137 { 138 AuthenticationClient* authClient = coreChallenge.authenticationClient(); 139 RetainPtr<WebCoreAuthenticationClientAsChallengeSender> challengeSender(AdoptNS, [[WebCoreAuthenticationClientAsChallengeSender alloc] initWithAuthenticationClient:authClient]); 140 RetainPtr<CFURLAuthChallengeRef> authChallenge(AdoptCF, createCF(coreChallenge)); 141 return [[NSURLAuthenticationChallenge _authenticationChallengeForCFAuthChallenge:authChallenge.get() sender:challengeSender.get()] autorelease]; 142 } 143 144 NSURLCredential *mac(const Credential& coreCredential) 145 { 146 RetainPtr<CFURLCredentialRef> credential(AdoptCF, createCF(coreCredential)); 147 return [[[NSURLCredential alloc] _initWithCFURLCredential:credential.get()] autorelease]; 148 } 149 150 #else 92 151 93 152 #ifdef BUILDING_ON_LEOPARD … … 360 419 } 361 420 421 #endif // USE(CFNETWORK) 422 362 423 } // namespace WebCore 363 364 #endif // !USE(CFNETWORK) -
trunk/Source/WebCore/platform/network/mac/CredentialStorageMac.mm
r51377 r86414 27 27 #include "CredentialStorage.h" 28 28 29 #if !USE(CFNETWORK) 30 29 31 #include "AuthenticationMac.h" 30 32 #include "Credential.h" … … 39 41 40 42 } // namespace WebCore 43 44 #endif // !USE(CFNETWORK) -
trunk/Source/WebKit/mac/ChangeLog
r86407 r86414 1 2011-05-12 Pratik Solanki <psolanki@apple.com> 2 3 Reviewed by Antti Koivisto. 4 5 Part of WebCore should use CFNetwork-based loader on Mac 6 https://bugs.webkit.org/show_bug.cgi?id=51836 7 8 Include AuthenticationCF.h header file. 9 10 * Misc/WebDownload.mm: 11 * Plugins/WebBaseNetscapePluginView.mm: 12 * WebCoreSupport/WebFrameLoaderClient.mm: 13 1 14 2011-05-12 Adele Peterson <adele@apple.com> 2 15 -
trunk/Source/WebKit/mac/Misc/WebDownload.mm
r70838 r86414 31 31 #import <Foundation/NSURLAuthenticationChallenge.h> 32 32 #import <Foundation/NSURLDownload.h> 33 #import <WebCore/AuthenticationCF.h> 33 34 #import <WebCore/AuthenticationMac.h> 34 35 #import <WebCore/Credential.h> -
trunk/Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
r85515 r86414 42 42 #import "WebViewInternal.h" 43 43 44 #import <WebCore/AuthenticationCF.h> 44 45 #import <WebCore/AuthenticationMac.h> 45 46 #import <WebCore/BitmapImage.h> -
trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
r85785 r86414 75 75 #import "WebUIDelegatePrivate.h" 76 76 #import "WebViewInternal.h" 77 #import <WebCore/AuthenticationCF.h> 77 78 #import <WebCore/AuthenticationMac.h> 78 79 #import <WebCore/BackForwardController.h>
Note: See TracChangeset
for help on using the changeset viewer.