REGRESSION (r240498): Storage Access API prompts result is not remembered
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Jan 2019 22:34:22 +0000 (22:34 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Jan 2019 22:34:22 +0000 (22:34 +0000)
commitab6dc4a6b91b5ebb003fe2a9286bf367c4387b39
tree36111fe283054be4cbaf445b2b0976c66f86879d
parent7b12110acb3bd5737fdfb5079647bdf5e8826359
REGRESSION (r240498): Storage Access API prompts result is not remembered
https://bugs.webkit.org/show_bug.cgi?id=193922
<rdar://problem/47608767>

Reviewed by Chris Dumez.

The refactoring in r240498 bypassed bookkeeping in ResourceLoadStatisticsMemoryStore
that kept track of whether a successful user prompt had been encountered. This
patch corrects this codepath so the user is not prompted repeatedly after approving
use of the Storage Access API.

* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::grantStorageAccess): Switch from Move operator to
const reference to allow the method to be called by the NetworkProcess.
* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::grantStorageAccess): Request access through the WebResourceLoadStatistics
object, rather than jumping directly to the NetworkStorageSession.

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