Changeset 216690 in webkit


Ignore:
Timestamp:
May 11, 2017 1:04:03 PM (7 years ago)
Author:
wilander@apple.com
Message:

Resource Load Statistics: Enable configuration through preferences
https://bugs.webkit.org/show_bug.cgi?id=171949
<rdar://problem/31894518>

Reviewed by Alex Christensen.

Source/WebCore:

No new tests. Just an added setter.

  • loader/ResourceLoadObserver.cpp:

(WebCore::ResourceLoadObserver::setReducedTimestampResolution):

Source/WebKit2:

  • Shared/WebPreferencesDefinitions.h:

Added ResourceLoadStatisticsTimeToLiveUserInteraction,
ResourceLoadStatisticsTimeToLiveCookiePartitionFree, and
ResourceLoadStatisticsReducedTimestampResolution.

  • UIProcess/Cocoa/WebResourceLoadStatisticsManagerCocoa.mm: Added.

(WebKit::WebResourceLoadStatisticsManager::registerUserDefaultsIfNeeded):

  • UIProcess/WebResourceLoadStatisticsManager.h:
  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):

Now calls WebResourceLoadStatisticsManager::registerUserDefaultsIfNeeded().

  • WebKit2.xcodeproj/project.pbxproj:
Location:
trunk/Source
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r216688 r216690  
     12017-05-11  John Wilander  <wilander@apple.com>
     2
     3        Resource Load Statistics: Enable configuration through preferences
     4        https://bugs.webkit.org/show_bug.cgi?id=171949
     5        <rdar://problem/31894518>
     6
     7        Reviewed by Alex Christensen.
     8
     9        No new tests. Just an added setter.
     10
     11        * loader/ResourceLoadObserver.cpp:
     12        (WebCore::ResourceLoadObserver::setReducedTimestampResolution):
     13
    1142017-05-11  Frederic Wang  <fwang@igalia.com>
    215
  • trunk/Source/WebCore/loader/ResourceLoadObserver.cpp

    r216171 r216690  
    433433}
    434434
     435void ResourceLoadObserver::setReducedTimestampResolution(double seconds)
     436{
     437    if (seconds > 0)
     438        timestampResolution = seconds;
     439}
     440
    435441void ResourceLoadObserver::fireDataModificationHandler()
    436442{
  • trunk/Source/WebKit2/ChangeLog

    r216675 r216690  
     12017-05-11  John Wilander  <wilander@apple.com>
     2
     3        Resource Load Statistics: Enable configuration through preferences
     4        https://bugs.webkit.org/show_bug.cgi?id=171949
     5        <rdar://problem/31894518>
     6
     7        Reviewed by Alex Christensen.
     8
     9        * Shared/WebPreferencesDefinitions.h:
     10            Added ResourceLoadStatisticsTimeToLiveUserInteraction,
     11            ResourceLoadStatisticsTimeToLiveCookiePartitionFree, and
     12            ResourceLoadStatisticsReducedTimestampResolution.
     13        * UIProcess/Cocoa/WebResourceLoadStatisticsManagerCocoa.mm: Added.
     14        (WebKit::WebResourceLoadStatisticsManager::registerUserDefaultsIfNeeded):
     15        * UIProcess/WebResourceLoadStatisticsManager.h:
     16        * UIProcess/WebResourceLoadStatisticsStore.cpp:
     17        (WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):
     18            Now calls WebResourceLoadStatisticsManager::registerUserDefaultsIfNeeded().
     19        * WebKit2.xcodeproj/project.pbxproj:
     20
    1212017-05-11  Claudio Saavedra  <csaavedra@igalia.com>
    222
  • trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h

    r216634 r216690  
    278278    macro(MaxParseDuration, maxParseDuration, Double, double, -1, "", "") \
    279279    macro(PasswordEchoDuration, passwordEchoDuration, Double, double, 2, "", "") \
     280    macro(ResourceLoadStatisticsTimeToLiveUserInteraction, resourceLoadStatisticsTimeToLiveUserInteraction, Double, double, 2592000, "", "") \
     281    macro(ResourceLoadStatisticsTimeToLiveCookiePartitionFree, resourceLoadStatisticsTimeToLiveCookiePartitionFree, Double, double, 86400, "", "") \
     282    macro(ResourceLoadStatisticsReducedTimestampResolution, resourceLoadStatisticsReducedTimestampResolution, Double, double, 3600, "", "") \
    280283    \
    281284
  • trunk/Source/WebKit2/UIProcess/WebResourceLoadStatisticsManager.h

    r216171 r216690  
    5858    static void clearInMemoryAndPersistentStoreModifiedSinceHours(unsigned);
    5959    static void resetToConsistentState();
     60#if PLATFORM(COCOA)
     61    static void registerUserDefaultsIfNeeded();
     62#endif
    6063
    6164private:
  • trunk/Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp

    r216265 r216690  
    3030#include "WebProcessPool.h"
    3131#include "WebProcessProxy.h"
     32#include "WebResourceLoadStatisticsManager.h"
    3233#include "WebResourceLoadStatisticsStoreMessages.h"
    3334#include "WebsiteDataFetchOption.h"
     
    183184{
    184185    registerSharedResourceLoadObserver();
     186#if PLATFORM(COCOA)
     187    WebResourceLoadStatisticsManager::registerUserDefaultsIfNeeded();
     188#endif
    185189    m_resourceLoadStatisticsStore->setShouldPartitionCookiesCallback([this, shouldPartitionCookiesForDomainsHandler = WTFMove(shouldPartitionCookiesForDomainsHandler)] (const Vector<String>& domainsToRemove, const Vector<String>& domainsToAdd, bool clearFirst) {
    186190        shouldPartitionCookiesForDomainsHandler(domainsToRemove, domainsToAdd, clearFirst);
  • trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj

    r216497 r216690  
    11861186                659C551E130006410025C0C2 /* InjectedBundlePageResourceLoadClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6546A82913000164000CEB1C /* InjectedBundlePageResourceLoadClient.cpp */; };
    11871187                65B86F1E12F11DE300B7DD8A /* WKBundleInspector.h in Headers */ = {isa = PBXBuildFile; fileRef = 65B86F1812F11D7B00B7DD8A /* WKBundleInspector.h */; settings = {ATTRIBUTES = (Private, ); }; };
     1188                6BBBAD381EC3E57800AD0A2A /* WebResourceLoadStatisticsManagerCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 6BBBAD371EC3E56300AD0A2A /* WebResourceLoadStatisticsManagerCocoa.mm */; };
    11881189                6BE9699C1E43B3FF008B7483 /* WKResourceLoadStatisticsManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BE9699B1E43B3FF008B7483 /* WKResourceLoadStatisticsManager.h */; settings = {ATTRIBUTES = (Private, ); }; };
    11891190                6BE9699E1E43B41D008B7483 /* WKResourceLoadStatisticsManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6BE9699D1E43B41D008B7483 /* WKResourceLoadStatisticsManager.cpp */; };
     
    34633464                65B86F1712F11D7B00B7DD8A /* WKBundleInspector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKBundleInspector.cpp; sourceTree = "<group>"; };
    34643465                65B86F1812F11D7B00B7DD8A /* WKBundleInspector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKBundleInspector.h; sourceTree = "<group>"; };
     3466                6BBBAD371EC3E56300AD0A2A /* WebResourceLoadStatisticsManagerCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebResourceLoadStatisticsManagerCocoa.mm; sourceTree = "<group>"; };
    34653467                6BE9699B1E43B3FF008B7483 /* WKResourceLoadStatisticsManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKResourceLoadStatisticsManager.h; sourceTree = "<group>"; };
    34663468                6BE9699D1E43B41D008B7483 /* WKResourceLoadStatisticsManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKResourceLoadStatisticsManager.cpp; sourceTree = "<group>"; };
     
    51945196                                7CE4D2151A49148400C7F152 /* WebProcessPoolCocoa.mm */,
    51955197                                1A04F6171A4A3A7A00A21B6E /* WebProcessProxyCocoa.mm */,
     5198                                6BBBAD371EC3E56300AD0A2A /* WebResourceLoadStatisticsManagerCocoa.mm */,
    51965199                                7AAD175E1EA6AF37003B0894 /* WebResourceLoadStatisticsStoreCocoa.mm */,
    51975200                                51D124311E6DE521002B2820 /* WebURLSchemeHandlerCocoa.h */,
     
    1030410307                                BC7B6207129A0A6700D174A4 /* WebPageGroup.cpp in Sources */,
    1030510308                                BC7B625312A43C9600D174A4 /* WebPageGroupData.cpp in Sources */,
     10309                                6BBBAD381EC3E57800AD0A2A /* WebResourceLoadStatisticsManagerCocoa.mm in Sources */,
    1030610310                                BC7B621612A4219A00D174A4 /* WebPageGroupProxy.cpp in Sources */,
    1030710311                                2D9EA3111A96D9EB002D2807 /* WebPageInjectedBundleClient.cpp in Sources */,
Note: See TracChangeset for help on using the changeset viewer.