Refactor Ignore HSTS code
authorwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Apr 2018 03:43:46 +0000 (03:43 +0000)
committerwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Apr 2018 03:43:46 +0000 (03:43 +0000)
commit4193bbcc8c5ffceb8aa13e5c6fffad220277a9dc
treea9057104934a345fdff09f2c18a6202b510cbd18
parent020c991f12a61c95c179d5c4271df69b243fe564
Refactor Ignore HSTS code
https://bugs.webkit.org/show_bug.cgi?id=184433
<rdar://problem/39298238>

Reviewed by Darin Adler.

This patch refactors our ignore HSTS code. The convenience functions are moved
out of CFNetwork SPI in PAL, and into where they are used. It also switches
from performSelector: calls to straight function calls, after checking that
there is a responder.

Source/WebCore:

* platform/network/mac/WebCoreURLResponse.mm:
(WebCore::schemeWasUpgradedDueToDynamicHSTS):
    Add convenience function here since it was moved out of
    CFNetworkSPI.h.

Source/WebCore/PAL:

* pal/spi/cf/CFNetworkSPI.h:
(schemeWasUpgradedDueToDynamicHSTS): Deleted.
(setIgnoreHSTS): Deleted.
(ignoreHSTS): Deleted.

Source/WebKit:

* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(schemeWasUpgradedDueToDynamicHSTS):
(setIgnoreHSTS):
(ignoreHSTS):
    Add convenience functions here since they were moved out of
    CFNetworkSPI.h.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230467 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h
Source/WebCore/platform/network/mac/WebCoreURLResponse.mm
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm