Changeset 219275 in webkit
- Timestamp:
- Jul 7, 2017 10:09:55 PM (7 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r219274 r219275 1 2017-07-07 Chris Dumez <cdumez@apple.com> 2 3 [WK2] Use a rolling 30-day uptime for processing statistics 4 https://bugs.webkit.org/show_bug.cgi?id=174235 5 <rdar://problem/33164381> 6 7 Reviewed by Brent Fulgham. 8 9 Follow-up fix for r219274 because it caused this test to time out: 10 http/tests/loading/resourceLoadStatistics/prevalent-resource-with-user-interaction-timeout.html 11 12 The test sets TimeToLiveUserInteraction to 0 so our implementation cannot use 13 0 as magic value to see if it was set. Instead, use std::optional. 14 15 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm: 16 (-[WKWebsiteDataStore _resourceLoadStatisticsResetToConsistentState]): 17 * UIProcess/Storage/ResourceLoadStatisticsStore.cpp: 18 (WebKit::ResourceLoadStatisticsStore::setTimeToLiveUserInteraction): 19 (WebKit::ResourceLoadStatisticsStore::hasStatisticsExpired): 20 * UIProcess/Storage/ResourceLoadStatisticsStore.h: 21 * UIProcess/WebResourceLoadStatisticsStore.cpp: 22 (WebKit::WebResourceLoadStatisticsStore::setTimeToLiveUserInteraction): 23 * UIProcess/WebResourceLoadStatisticsStore.h: 24 1 25 2017-07-07 Brent Fulgham <bfulgham@apple.com> 2 26 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
r219274 r219275 441 441 return; 442 442 443 store->setTimeToLiveUserInteraction(0_s); 443 // FIXME: These needs to match the default data member values in ResourceLoadStatistics, which is fragile. 444 store->setTimeToLiveUserInteraction(std::nullopt); 444 445 store->setTimeToLiveCookiePartitionFree(24_h); 445 446 store->setMinimumTimeBetweenDataRecordsRemoval(1_h); -
trunk/Source/WebKit2/UIProcess/Storage/ResourceLoadStatisticsStore.cpp
r219274 r219275 276 276 } 277 277 278 void ResourceLoadStatisticsStore::setTimeToLiveUserInteraction( Secondsseconds)279 { 280 ASSERT( seconds>= 0_s);278 void ResourceLoadStatisticsStore::setTimeToLiveUserInteraction(std::optional<Seconds> seconds) 279 { 280 ASSERT(!seconds || seconds.value() >= 0_s); 281 281 m_timeToLiveUserInteraction = seconds; 282 282 } … … 444 444 // setting for a tighter restriction (mainly for testing). 445 445 if (m_timeToLiveUserInteraction) { 446 if (WallTime::now() > resourceStatistic.mostRecentUserInteractionTime + m_timeToLiveUserInteraction )446 if (WallTime::now() > resourceStatistic.mostRecentUserInteractionTime + m_timeToLiveUserInteraction.value()) 447 447 return true; 448 448 } -
trunk/Source/WebKit2/UIProcess/Storage/ResourceLoadStatisticsStore.h
r219274 r219275 82 82 void fireDataModificationHandler(); 83 83 void fireTelemetryHandler(); 84 void setTimeToLiveUserInteraction( Seconds);84 void setTimeToLiveUserInteraction(std::optional<Seconds>); 85 85 void setTimeToLiveCookiePartitionFree(Seconds); 86 86 void setMinimumTimeBetweenDataRecordsRemoval(Seconds); … … 118 118 WTF::Function<void()> m_fireTelemetryHandler; 119 119 120 Seconds m_timeToLiveUserInteraction { 0_s };120 std::optional<Seconds> m_timeToLiveUserInteraction; 121 121 Seconds m_timeToLiveCookiePartitionFree { 24_h }; 122 122 Seconds m_grandfatheringTime { 1_h }; -
trunk/Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp
r219274 r219275 748 748 } 749 749 750 void WebResourceLoadStatisticsStore::setTimeToLiveUserInteraction( Secondsseconds)750 void WebResourceLoadStatisticsStore::setTimeToLiveUserInteraction(std::optional<Seconds> seconds) 751 751 { 752 752 coreStore().setTimeToLiveUserInteraction(seconds); -
trunk/Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.h
r219274 r219275 96 96 void clearInMemoryAndPersistent(std::chrono::system_clock::time_point modifiedSince); 97 97 98 void setTimeToLiveUserInteraction( Seconds);98 void setTimeToLiveUserInteraction(std::optional<Seconds>); 99 99 void setTimeToLiveCookiePartitionFree(Seconds); 100 100 void setMinimumTimeBetweenDataRecordsRemoval(Seconds);
Note: See TracChangeset
for help on using the changeset viewer.