Clean up AuthenticationChallengeProxy
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Sep 2018 20:55:55 +0000 (20:55 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Sep 2018 20:55:55 +0000 (20:55 +0000)
commit022a97be8d11f6fb6934503763e21d9708eea1f3
tree5ec64cf2bd79bcc04cf2bf535d3f4f5b1799ce63
parentb9784eb8dafc10ccd26fca24a2957cf01c5f7113
Clean up AuthenticationChallengeProxy
https://bugs.webkit.org/show_bug.cgi?id=189668

Reviewed by Youenn Fablet.

At its core, it's a CompletionHandler with some information.
Make it more elegant and simple with no change in behavior and reduce the complexity of this security-sensitive object.

* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(toNSURLSessionAuthChallengeDisposition):
* Shared/Authentication/AuthenticationManager.cpp:
(WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge):
* Shared/Authentication/AuthenticationManager.h:
* UIProcess/API/C/WKAuthenticationChallenge.cpp:
(WKAuthenticationChallengeGetDecisionListener):
(WKAuthenticationChallengeGetProtectionSpace):
(WKAuthenticationChallengeGetProposedCredential):
(WKAuthenticationChallengeGetPreviousFailureCount):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageNavigationClient):
* UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.mm:
(-[WKNSURLAuthenticationChallengeSender cancelAuthenticationChallenge:]):
(-[WKNSURLAuthenticationChallengeSender continueWithoutCredentialForAuthenticationChallenge:]):
(-[WKNSURLAuthenticationChallengeSender useCredential:forAuthenticationChallenge:]):
(-[WKNSURLAuthenticationChallengeSender performDefaultHandlingForAuthenticationChallenge:]):
(-[WKNSURLAuthenticationChallengeSender rejectProtectionSpaceAndContinueWithChallenge:]):
* UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
(WebKit::AuthenticationChallengeProxy::AuthenticationChallengeProxy):
(WebKit::AuthenticationChallengeProxy::~AuthenticationChallengeProxy): Deleted.
(WebKit::AuthenticationChallengeProxy::useCredential): Deleted.
(WebKit::AuthenticationChallengeProxy::cancel): Deleted.
(WebKit::AuthenticationChallengeProxy::performDefaultHandling): Deleted.
(WebKit::AuthenticationChallengeProxy::rejectProtectionSpaceAndContinue): Deleted.
(WebKit::AuthenticationChallengeProxy::proposedCredential const): Deleted.
(WebKit::AuthenticationChallengeProxy::protectionSpace const): Deleted.
(WebKit::AuthenticationChallengeProxy::setSecKeyProxyStore): Deleted.
* UIProcess/Authentication/AuthenticationChallengeProxy.h:
(WebKit::AuthenticationChallengeProxy::create):
(WebKit::AuthenticationChallengeProxy::listener const):
(WebKit::AuthenticationChallengeProxy::previousFailureCount const): Deleted.
* UIProcess/Authentication/AuthenticationDecisionListener.cpp:
(WebKit::AuthenticationDecisionListener::AuthenticationDecisionListener):
(WebKit::AuthenticationDecisionListener::~AuthenticationDecisionListener):
(WebKit::AuthenticationDecisionListener::useCredential):
(WebKit::AuthenticationDecisionListener::cancel):
(WebKit::AuthenticationDecisionListener::performDefaultHandling):
(WebKit::AuthenticationDecisionListener::rejectProtectionSpaceAndContinue):
(WebKit::AuthenticationDecisionListener::detachChallenge): Deleted.
* UIProcess/Authentication/AuthenticationDecisionListener.h:
(WebKit::AuthenticationDecisionListener::create):
* UIProcess/Authentication/cocoa/AuthenticationChallengeProxyCocoa.mm:
(WebKit::AuthenticationChallengeProxy::sendClientCertificateCredentialOverXpc):
(WebKit::AuthenticationChallengeProxy::sendClientCertificateCredentialOverXpc const): Deleted.
* UIProcess/Cocoa/DownloadClient.mm:
(WebKit::DownloadClient::didReceiveAuthenticationChallenge):
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationClient::didReceiveAuthenticationChallenge):
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::didReceiveAuthenticationChallenge):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::didReceiveAuthenticationChallenge):
* UIProcess/ServiceWorkerProcessProxy.cpp:
(WebKit::ServiceWorkerProcessProxy::didReceiveAuthenticationChallenge):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::secKeyProxyStore):
(WebKit::WebPageProxy::didReceiveAuthenticationChallengeProxy):
* UIProcess/WebPageProxy.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236153 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 files changed:
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
Source/WebKit/Shared/Authentication/AuthenticationManager.cpp
Source/WebKit/Shared/Authentication/AuthenticationManager.h
Source/WebKit/UIProcess/API/C/WKAuthenticationChallenge.cpp
Source/WebKit/UIProcess/API/C/WKAuthenticationDecisionListener.cpp
Source/WebKit/UIProcess/API/C/WKPage.cpp
Source/WebKit/UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.mm
Source/WebKit/UIProcess/API/glib/WebKitAuthenticationRequest.cpp
Source/WebKit/UIProcess/Authentication/AuthenticationChallengeProxy.cpp
Source/WebKit/UIProcess/Authentication/AuthenticationChallengeProxy.h
Source/WebKit/UIProcess/Authentication/AuthenticationDecisionListener.cpp
Source/WebKit/UIProcess/Authentication/AuthenticationDecisionListener.h
Source/WebKit/UIProcess/Authentication/cocoa/AuthenticationChallengeProxyCocoa.mm
Source/WebKit/UIProcess/Cocoa/DownloadClient.mm
Source/WebKit/UIProcess/Cocoa/NavigationState.mm
Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp
Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp
Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp
Source/WebKit/UIProcess/WebPageProxy.cpp
Source/WebKit/UIProcess/WebPageProxy.h