Resource Load Statistics: Change grandfathering default to one hour
authorwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 May 2017 17:36:56 +0000 (17:36 +0000)
committerwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 May 2017 17:36:56 +0000 (17:36 +0000)
https://bugs.webkit.org/show_bug.cgi?id=172524
<rdar://problem/32360462>

Reviewed by Brent Fulgham.

Source/WebCore:

Covered by existing test.

* loader/ResourceLoadStatisticsStore.cpp:

Source/WebKit2:

* Shared/WebPreferencesDefinitions.h:
* UIProcess/WebResourceLoadStatisticsManager.cpp:
(WebKit::WebResourceLoadStatisticsManager::resetToConsistentState):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217372 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/loader/ResourceLoadStatisticsStore.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/WebPreferencesDefinitions.h
Source/WebKit2/UIProcess/WebResourceLoadStatisticsManager.cpp

index f856f6cca20c27e7b8611b707ce30ca5dbece269..1df3495e8bc6b60b62790c30cfaab7ecaf4e0431 100644 (file)
@@ -1,3 +1,15 @@
+2017-05-24  John Wilander  <wilander@apple.com>
+
+        Resource Load Statistics: Change grandfathering default to one hour
+        https://bugs.webkit.org/show_bug.cgi?id=172524
+        <rdar://problem/32360462>
+
+        Reviewed by Brent Fulgham.
+
+        Covered by existing test.
+
+        * loader/ResourceLoadStatisticsStore.cpp:
+
 2017-05-24  Jer Noble  <jer.noble@apple.com>
 
         Rename DisplaySleepDisabler -> SleepDisabler
index 5ab33433c94ba4c677afbd35ef96f1dac8e9ea80..47721f2140231b411f558ae9b0ae749e16307259 100644 (file)
 namespace WebCore {
 
 static const auto statisticsModelVersion = 4;
-static const auto secondsPerDay = 24 * 3600;
+static const auto secondsPerHour = 3600;
+static const auto secondsPerDay = 24 * secondsPerHour;
 static auto timeToLiveUserInteraction = 30 * secondsPerDay;
 static auto timeToLiveCookiePartitionFree = 1 * secondsPerDay;
-static auto grandfatheringTime = 3 * secondsPerDay;
+static auto grandfatheringTime = 1 * secondsPerHour;
 static auto minimumTimeBetweeenDataRecordsRemoval = 60;
 
 Ref<ResourceLoadStatisticsStore> ResourceLoadStatisticsStore::create()
index 08d8eeec7d9ba162d395ea95f42199a8df2cddaf..f2c349d2847986ffc41e4914ba02df49fee57dfe 100644 (file)
@@ -1,3 +1,15 @@
+2017-05-24  John Wilander  <wilander@apple.com>
+
+        Resource Load Statistics: Change grandfathering default to one hour
+        https://bugs.webkit.org/show_bug.cgi?id=172524
+        <rdar://problem/32360462>
+
+        Reviewed by Brent Fulgham.
+
+        * Shared/WebPreferencesDefinitions.h:
+        * UIProcess/WebResourceLoadStatisticsManager.cpp:
+        (WebKit::WebResourceLoadStatisticsManager::resetToConsistentState):
+
 2017-05-24  Jer Noble  <jer.noble@apple.com>
 
         Rename DisplaySleepDisabler -> SleepDisabler
index c591c512491d5e437499930b33a8822566a43084..dc3c3120e4fe42d8d9410d96eae868417483bf0c 100644 (file)
     macro(ResourceLoadStatisticsTimeToLiveUserInteraction, resourceLoadStatisticsTimeToLiveUserInteraction, Double, double, 2592000, "", "") \
     macro(ResourceLoadStatisticsTimeToLiveCookiePartitionFree, resourceLoadStatisticsTimeToLiveCookiePartitionFree, Double, double, 86400, "", "") \
     macro(ResourceLoadStatisticsReducedTimestampResolution, resourceLoadStatisticsReducedTimestampResolution, Double, double, 3600, "", "") \
-    macro(ResourceLoadStatisticsGrandfatheringTime, resourceLoadStatisticsGrandfatheringTime, Double, double, 259200, "", "") \
+    macro(ResourceLoadStatisticsGrandfatheringTime, resourceLoadStatisticsGrandfatheringTime, Double, double, 3600, "", "") \
 \
 
 #define FOR_EACH_WEBKIT_UINT32_PREFERENCE(macro) \
index e4bb1807046a7f3303d13afc4b97e669f597c374..dc582cf7515a55c98e0900c84491e46a4bac68c8 100644 (file)
@@ -149,6 +149,7 @@ void WebResourceLoadStatisticsManager::resetToConsistentState()
     WebCore::ResourceLoadObserver::sharedObserver().setTimeToLiveUserInteraction(2592000);
     WebCore::ResourceLoadObserver::sharedObserver().setTimeToLiveCookiePartitionFree(86400);
     WebCore::ResourceLoadObserver::sharedObserver().setMinimumTimeBetweeenDataRecordsRemoval(60);
+    WebCore::ResourceLoadObserver::sharedObserver().setGrandfatheringTime(3600);
     WebResourceLoadStatisticsStore::setNotifyPagesWhenDataRecordsWereScanned(false);
     WebResourceLoadStatisticsStore::setShouldClassifyResourcesBeforeDataRecordsRemoval(true);
     WebCore::ResourceLoadObserver::sharedObserver().clearInMemoryStore();