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 f856f6c..1df3495 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 5ab3343..47721f2 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 08d8eee..f2c349d 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 c591c51..dc3c312 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 e4bb180..dc582cf 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();