Changeset 259521 in webkit
- Timestamp:
- Apr 3, 2020 4:45:58 PM (4 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r259520 r259521 1 2020-04-03 Alex Christensen <achristensen@webkit.org> 2 3 Use AuthenticationChallenge instead of AuthenticationChallengeProxy for ResourceLoadDelegate 4 https://bugs.webkit.org/show_bug.cgi?id=207639 5 6 Reviewed by David Kilzer. 7 8 In r254345 my younger and more naive self used AuthenticationChallengeProxy instead of AuthenticationChallenge 9 because he didn't know about the WebCore::mac function, which is called by AuthenticationChallengeProxy, and it's 10 all I needed to get an NSURLAuthenticationChallenge. Skipping the AuthenticationChallengeProxy step cleans up 11 AuthenticationChallengeProxy by removing the unnecessary ability to have a null CompletionHandler. 12 13 Covered by existing tests. 14 15 * UIProcess/API/APIResourceLoadClient.h: 16 * UIProcess/Authentication/AuthenticationChallengeProxy.cpp: 17 (WebKit::AuthenticationChallengeProxy::AuthenticationChallengeProxy): 18 (): Deleted. 19 * UIProcess/Cocoa/ResourceLoadDelegate.h: 20 * UIProcess/Cocoa/ResourceLoadDelegate.mm: 21 (WebKit::ResourceLoadDelegate::ResourceLoadClient::didReceiveChallenge const): 22 * UIProcess/Network/NetworkProcessProxy.cpp: 23 (WebKit::NetworkProcessProxy::resourceLoadDidReceiveChallenge): 24 * UIProcess/WebPageProxy.cpp: 25 * UIProcess/WebPageProxy.h: 26 1 27 2020-04-03 Kate Cheney <katherine_cheney@apple.com> 2 28 -
trunk/Source/WebKit/UIProcess/API/APIResourceLoadClient.h
r257818 r259521 30 30 #include <WebCore/ResourceResponse.h> 31 31 32 namespace WebCore { 33 class AuthenticationChallenge; 34 } 35 32 36 namespace WebKit { 33 class AuthenticationChallengeProxy;34 37 struct ResourceLoadInfo; 35 38 } … … 43 46 virtual void didSendRequest(WebKit::ResourceLoadInfo&&, WebCore::ResourceRequest&&) const = 0; 44 47 virtual void didPerformHTTPRedirection(WebKit::ResourceLoadInfo&&, WebCore::ResourceResponse&&, WebCore::ResourceRequest&&) const = 0; 45 virtual void didReceiveChallenge(WebKit::ResourceLoadInfo&&, Web Kit::AuthenticationChallengeProxy&) const = 0;48 virtual void didReceiveChallenge(WebKit::ResourceLoadInfo&&, WebCore::AuthenticationChallenge&&) const = 0; 46 49 virtual void didReceiveResponse(WebKit::ResourceLoadInfo&&, WebCore::ResourceResponse&&) const = 0; 47 50 virtual void didCompleteWithError(WebKit::ResourceLoadInfo&&, WebCore::ResourceResponse&&, WebCore::ResourceError&&) const = 0; -
trunk/Source/WebKit/UIProcess/Authentication/AuthenticationChallengeProxy.cpp
r254345 r259521 46 46 AuthenticationChallengeProxy::AuthenticationChallengeProxy(WebCore::AuthenticationChallenge&& authenticationChallenge, uint64_t challengeID, Ref<IPC::Connection>&& connection, WeakPtr<SecKeyProxyStore>&& secKeyProxyStore) 47 47 : m_coreAuthenticationChallenge(WTFMove(authenticationChallenge)) 48 , m_listener(AuthenticationDecisionListener::create( challengeID ? CompletionHandler<void(AuthenticationChallengeDisposition, const WebCore::Credential&)>([challengeID, connection = WTFMove(connection), secKeyProxyStore = WTFMove(secKeyProxyStore)](AuthenticationChallengeDisposition disposition, const WebCore::Credential& credential) {48 , m_listener(AuthenticationDecisionListener::create([challengeID, connection = WTFMove(connection), secKeyProxyStore = WTFMove(secKeyProxyStore)](AuthenticationChallengeDisposition disposition, const WebCore::Credential& credential) { 49 49 #if HAVE(SEC_KEY_PROXY) 50 50 if (secKeyProxyStore && secKeyProxyStore->initialize(credential)) { … … 54 54 #endif 55 55 connection->send(Messages::AuthenticationManager::CompleteAuthenticationChallenge(challengeID, disposition, credential), 0); 56 }) : nullptr))56 })) 57 57 { 58 ASSERT(challengeID); 58 59 } 59 60 -
trunk/Source/WebKit/UIProcess/Cocoa/ResourceLoadDelegate.h
r257818 r259521 62 62 void didSendRequest(ResourceLoadInfo&&, WebCore::ResourceRequest&&) const final; 63 63 void didPerformHTTPRedirection(ResourceLoadInfo&&, WebCore::ResourceResponse&&, WebCore::ResourceRequest&&) const final; 64 void didReceiveChallenge(ResourceLoadInfo&&, Web Kit::AuthenticationChallengeProxy&) const final;64 void didReceiveChallenge(ResourceLoadInfo&&, WebCore::AuthenticationChallenge&&) const final; 65 65 void didReceiveResponse(ResourceLoadInfo&&, WebCore::ResourceResponse&&) const final; 66 66 void didCompleteWithError(ResourceLoadInfo&&, WebCore::ResourceResponse&&, WebCore::ResourceError&&) const final; -
trunk/Source/WebKit/UIProcess/Cocoa/ResourceLoadDelegate.mm
r257818 r259521 27 27 #import "ResourceLoadDelegate.h" 28 28 29 #import <WebCore/AuthenticationMac.h> 29 30 #import "AuthenticationChallengeProxy.h" 30 31 #import "WKNSURLAuthenticationChallenge.h" … … 98 99 } 99 100 100 void ResourceLoadDelegate::ResourceLoadClient::didReceiveChallenge(WebKit::ResourceLoadInfo&& loadInfo, Web Kit::AuthenticationChallengeProxy& challenge) const101 void ResourceLoadDelegate::ResourceLoadClient::didReceiveChallenge(WebKit::ResourceLoadInfo&& loadInfo, WebCore::AuthenticationChallenge&& challenge) const 101 102 { 102 103 if (!m_resourceLoadDelegate.m_delegateMethods.didReceiveChallenge) … … 107 108 return; 108 109 109 [delegate webView:m_resourceLoadDelegate.m_webView.get().get() resourceLoad:wrapper(API::ResourceLoadInfo::create(WTFMove(loadInfo)).get()) didReceiveChallenge: wrapper(challenge)];110 [delegate webView:m_resourceLoadDelegate.m_webView.get().get() resourceLoad:wrapper(API::ResourceLoadInfo::create(WTFMove(loadInfo)).get()) didReceiveChallenge:mac(challenge)]; 110 111 } 111 112 -
trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp
r259275 r259521 505 505 return; 506 506 507 auto challengeProxy = AuthenticationChallengeProxy::create(WTFMove(challenge), 0, *connection(), nullptr); 508 page->resourceLoadDidReceiveChallenge(WTFMove(loadInfo), challengeProxy.get()); 507 page->resourceLoadDidReceiveChallenge(WTFMove(loadInfo), WTFMove(challenge)); 509 508 } 510 509 -
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
r259507 r259521 6106 6106 } 6107 6107 6108 void WebPageProxy::resourceLoadDidReceiveChallenge(ResourceLoadInfo&& loadInfo, Web Kit::AuthenticationChallengeProxy& challenge)6108 void WebPageProxy::resourceLoadDidReceiveChallenge(ResourceLoadInfo&& loadInfo, WebCore::AuthenticationChallenge&& challenge) 6109 6109 { 6110 6110 if (m_resourceLoadClient) 6111 m_resourceLoadClient->didReceiveChallenge(WTFMove(loadInfo), challenge);6111 m_resourceLoadClient->didReceiveChallenge(WTFMove(loadInfo), WTFMove(challenge)); 6112 6112 } 6113 6113 -
trunk/Source/WebKit/UIProcess/WebPageProxy.h
r259507 r259521 477 477 void resourceLoadDidSendRequest(ResourceLoadInfo&&, WebCore::ResourceRequest&&); 478 478 void resourceLoadDidPerformHTTPRedirection(ResourceLoadInfo&&, WebCore::ResourceResponse&&, WebCore::ResourceRequest&&); 479 void resourceLoadDidReceiveChallenge(ResourceLoadInfo&&, Web Kit::AuthenticationChallengeProxy&);479 void resourceLoadDidReceiveChallenge(ResourceLoadInfo&&, WebCore::AuthenticationChallenge&&); 480 480 void resourceLoadDidReceiveResponse(ResourceLoadInfo&&, WebCore::ResourceResponse&&); 481 481 void resourceLoadDidCompleteWithError(ResourceLoadInfo&&, WebCore::ResourceResponse&&, WebCore::ResourceError&&);
Note: See TracChangeset
for help on using the changeset viewer.