Resource Load Statistics: Remove all statistics for modifiedSince website data removals
authorwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 May 2017 04:16:39 +0000 (04:16 +0000)
committerwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 May 2017 04:16:39 +0000 (04:16 +0000)
commit1ac7d6b5bab3c0ac759f3efa7525b9724f9fb824
tree5925bf32aef0ab726b4e1124d0c26358aa1ed26b
parent7902adc227c7445bb1ecf5b62ed008384ef3733b
Resource Load Statistics: Remove all statistics for modifiedSince website data removals
https://bugs.webkit.org/show_bug.cgi?id=171584
<rdar://problem/24702576>

Reviewed by Brent Fulgham.

Source/WebCore:

Test: http/tests/loading/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour.html

* loader/ResourceLoadObserver.cpp:
(WebCore::ResourceLoadObserver::clearInMemoryAndPersistentStore):
    Now clears all regardless of the modifiedSince parameter's value.

Source/WebKit2:

These are all test infrastructure changes.

* UIProcess/API/C/WKResourceLoadStatisticsManager.cpp:
(WKResourceLoadStatisticsManagerClearInMemoryAndPersistentStoreModifiedSinceHours):
* UIProcess/API/C/WKResourceLoadStatisticsManager.h:
* UIProcess/WebResourceLoadStatisticsManager.cpp:
(WebKit::WebResourceLoadStatisticsManager::clearInMemoryAndPersistentStoreModifiedSinceHours):
* UIProcess/WebResourceLoadStatisticsManager.h:

Tools:

New function to call the clear function that takes a modifiedSince parameter.

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

* http/tests/loading/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour-expected.txt: Added.
* http/tests/loading/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@216171 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/loading/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/loading/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/loader/ResourceLoadObserver.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/C/WKResourceLoadStatisticsManager.cpp
Source/WebKit2/UIProcess/API/C/WKResourceLoadStatisticsManager.h
Source/WebKit2/UIProcess/WebResourceLoadStatisticsManager.cpp
Source/WebKit2/UIProcess/WebResourceLoadStatisticsManager.h
Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
Tools/WebKitTestRunner/InjectedBundle/TestRunner.h
Tools/WebKitTestRunner/TestController.cpp
Tools/WebKitTestRunner/TestController.h
Tools/WebKitTestRunner/TestInvocation.cpp