Skip to content

Commit

Permalink
Drop NetworkStorageSession::supportsCookieChangeListenerAPI()
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=258580

Reviewed by Brent Fulgham.

Drop NetworkStorageSession::supportsCookieChangeListenerAPI() now that this API
has been present for a while.

* Source/WebCore/platform/network/NetworkStorageSession.h:
* Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm:
(WebCore::NetworkStorageSession::supportsCookieChangeListenerAPI const): Deleted.
* Source/WebKit/WebProcess/WebPage/WebCookieCache.cpp:
(WebKit::WebCookieCache::isSupported):

Canonical link: https://commits.webkit.org/265562@main
  • Loading branch information
cdumez committed Jun 27, 2023
1 parent 613026d commit fca03d0
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
1 change: 0 additions & 1 deletion Source/WebCore/platform/network/NetworkStorageSession.h
Expand Up @@ -179,7 +179,6 @@ class NetworkStorageSession : public CanMakeWeakPtr<NetworkStorageSession> {
#if HAVE(COOKIE_CHANGE_LISTENER_API)
WEBCORE_EXPORT void startListeningForCookieChangeNotifications(CookieChangeObserver&, const String& host);
WEBCORE_EXPORT void stopListeningForCookieChangeNotifications(CookieChangeObserver&, const HashSet<String>& hosts);
WEBCORE_EXPORT bool supportsCookieChangeListenerAPI() const;
#endif

#if ENABLE(TRACKING_PREVENTION)
Expand Down
Expand Up @@ -754,13 +754,6 @@ static NSHTTPCookieAcceptPolicy httpCookieAcceptPolicy(CFHTTPCookieStorageRef co
[nsCookieStorage() _setSubscribedDomainsForCookieChanges:m_subscribedDomainsForCookieChanges.get()];
}

// FIXME: This can eventually go away, this is merely to ensure a smooth transition to the new API.
bool NetworkStorageSession::supportsCookieChangeListenerAPI() const
{
static const bool supportsAPI = [nsCookieStorage() respondsToSelector:@selector(_setCookiesChangedHandler:onQueue:)];
return supportsAPI;
}

#endif // HAVE(COOKIE_CHANGE_LISTENER_API)

} // namespace WebCore
3 changes: 1 addition & 2 deletions Source/WebKit/WebProcess/WebPage/WebCookieCache.cpp
Expand Up @@ -37,8 +37,7 @@ using namespace WebCore;
bool WebCookieCache::isSupported()
{
#if HAVE(COOKIE_CHANGE_LISTENER_API)
// FIXME: This can eventually be removed, this is merely to ensure a smooth transition to the new API.
return inMemoryStorageSession().supportsCookieChangeListenerAPI();
return true;
#else
return false;
#endif
Expand Down

0 comments on commit fca03d0

Please sign in to comment.