Resource Load Statistics: Implement callback support for removal of WebsiteDataType...
authorwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Jan 2018 19:26:13 +0000 (19:26 +0000)
committerwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Jan 2018 19:26:13 +0000 (19:26 +0000)
commit1c63f1f5eb815502d071d3aa4ee599fc00150369
tree649c46aeeadf90477809be4ada271457988f3d68
parenta30d09bbd58b361ab4cfbf24e5bc9b1bad48161a
Resource Load Statistics: Implement callback support for removal of WebsiteDataType::ResourceLoadStatistics
https://bugs.webkit.org/show_bug.cgi?id=181822
https://bugs.webkit.org/show_bug.cgi?id=175263
https://bugs.webkit.org/show_bug.cgi?id=178536
https://bugs.webkit.org/show_bug.cgi?id=181223
https://bugs.webkit.org/show_bug.cgi?id=181482
<rdar://problem/33491222>
<rdar://problem/33805293>
<rdar://problem/36332683>
<rdar://problem/36549026>

Reviewed by Alex Christensen.

Source/WebKit:

* UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
(WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStore):
(WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStore]):
    Calls the new API with no-op completion handler.
(-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStore:]):
    New API with completion handler.
(-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours:]):
    Calls the new API with no-op completion handler.
(-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours:completionHandler:]):
    New API with completion handler.
* UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
* UIProcess/ResourceLoadStatisticsPersistentStorage.cpp:
(WebKit::ResourceLoadStatisticsPersistentStorage::populateMemoryStoreFromDisk):
* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData):
(WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent):
* UIProcess/WebResourceLoadStatisticsStore.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::removeData):
(WebKit::WebsiteDataStore::clearResourceLoadStatisticsInWebProcesses):
* UIProcess/WebsiteData/WebsiteDataStore.h:

Tools:

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::statisticsClearInMemoryAndPersistentStore):
(WTR::TestRunner::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::statisticsClearInMemoryAndPersistentStore):
(WTR::TestController::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours):

LayoutTests:

* http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour.html:
* http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store.html:
* http/tests/resourceLoadStatistics/grandfathering.html:
* platform/ios/TestExpectations:
    Marked the three updated tests as [ Pass ].
* platform/mac-wk2/TestExpectations:
    Marked the three updated tests as [ Pass ].

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227223 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour.html
LayoutTests/http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store.html
LayoutTests/http/tests/resourceLoadStatistics/grandfathering.html
LayoutTests/platform/ios/TestExpectations
LayoutTests/platform/mac-wk2/TestExpectations
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp
Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h
Source/WebKit/UIProcess/ResourceLoadStatisticsPersistentStorage.cpp
Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp
Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.h
Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h
Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
Tools/WebKitTestRunner/InjectedBundle/TestRunner.h
Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm