Skip to content

Commit

Permalink
Revert da5e573. rdar://problem/102292977
Browse files Browse the repository at this point in the history
  • Loading branch information
alancoon committed Nov 14, 2022
1 parent f913da4 commit 0189004
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -63,8 +63,8 @@ class SOAuthorizationCoordinator {
private:
bool canAuthorize(const URL&) const;

RetainPtr<SOAuthorization> m_soAuthorization;
RetainPtr<WKSOAuthorizationDelegate> m_soAuthorizationDelegate;
bool m_hasAppSSO { false };
};

} // namespace WebKit
Expand Down
Expand Up @@ -48,19 +48,19 @@

SOAuthorizationCoordinator::SOAuthorizationCoordinator()
{
m_hasAppSSO = !!PAL::getSOAuthorizationClass();
#if PLATFORM(MAC)
// In the case of base system, which doesn't have AppSSO.framework.
if (!m_hasAppSSO)
if (!PAL::getSOAuthorizationClass())
return;
#endif
m_soAuthorization = adoptNS([PAL::allocSOAuthorizationInstance() init]);
m_soAuthorizationDelegate = adoptNS([[WKSOAuthorizationDelegate alloc] init]);
[NSURLSession _disableAppSSO];
}

bool SOAuthorizationCoordinator::canAuthorize(const URL& url) const
{
return m_hasAppSSO && [PAL::getSOAuthorizationClass() canPerformAuthorizationWithURL:url responseCode:0];
return m_soAuthorization && [PAL::getSOAuthorizationClass() canPerformAuthorizationWithURL:url responseCode:0];
}

void SOAuthorizationCoordinator::tryAuthorize(Ref<API::NavigationAction>&& navigationAction, WebPageProxy& page, Function<void(bool)>&& completionHandler)
Expand Down

0 comments on commit 0189004

Please sign in to comment.