Storage Access API: Make user opt-in sticky
authorwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 May 2018 23:59:29 +0000 (23:59 +0000)
committerwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 May 2018 23:59:29 +0000 (23:59 +0000)
commit2dcbd593a194e3a7f5821ae06a7b4fda47dfb248
tree54ce2e677bfada1253167a6742db3d13e35c246a
parent617bd5ba3826d29cfe5d10d0675b43ae12e55ad5
Storage Access API: Make user opt-in sticky
https://bugs.webkit.org/show_bug.cgi?id=185454
<rdar://problem/40003946>

Reviewed by Alex Christensen.

This patch persists the user's choice to opt-in to access under specific domains.
Such storage access should age out with the accessing domain's cookies and website
data. The opt-in prompt is still an experimental feature.

* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::hasStorageAccess):
(WebKit::WebResourceLoadStatisticsStore::requestStorageAccess):
(WebKit::WebResourceLoadStatisticsStore::requestStorageAccessUnderOpener):
(WebKit::WebResourceLoadStatisticsStore::grantStorageAccess):
(WebKit::WebResourceLoadStatisticsStore::grantStorageAccessInternal):
(WebKit::WebResourceLoadStatisticsStore::hasUserGrantedStorageAccessThroughPrompt const):
(WebKit::WebResourceLoadStatisticsStore::hasHadUnexpiredRecentUserInteraction const):
* UIProcess/WebResourceLoadStatisticsStore.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231524 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp
Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.h