| Differences between
and this patch
- Source/WebCore/ChangeLog +28 lines
Lines 1-3 Source/WebCore/ChangeLog_sec1
1
2018-01-29  John Wilander  <wilander@apple.com>
2
3
        Resource Load Statistics: Introduce debug mode as experimental feature
4
        https://bugs.webkit.org/show_bug.cgi?id=182199
5
        <rdar://problem/36930364>
6
7
        Reviewed by NOBODY (OOPS!).
8
9
        No new tests. This adds an experimental feature.
10
11
        The only changes to default behavior are:
12
        - Increased resolution on timestamps which is needed to be able to set shorter
13
          timeouts in debug mode.
14
        - Only update partitioning and blocking table when needed. This is an optimization
15
          which pays off in less XPC with shorter timeouts.
16
17
        * loader/ResourceLoadObserver.cpp:
18
        (WebCore::reduceTimeResolution):
19
        (WebCore::ResourceLoadObserver::logFrameNavigation):
20
        (WebCore::ResourceLoadObserver::logSubresourceLoading):
21
        (WebCore::ResourceLoadObserver::logWebSocketLoading):
22
        (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
23
        (WebCore::reduceToHourlyTimeResolution): Deleted.
24
        * page/RuntimeEnabledFeatures.h:
25
        (WebCore::RuntimeEnabledFeatures::setResourceLoadStatisticsDebugMode):
26
        (WebCore::RuntimeEnabledFeatures::resourceLoadStatisticsDebugMode const):
27
        * page/Settings.yaml:
28
1
2018-01-29  Brady Eidson  <beidson@apple.com>
29
2018-01-29  Brady Eidson  <beidson@apple.com>
2
30
3
        Make it possible for apps that use both WK1 and WK2 to use MessagePorts.
31
        Make it possible for apps that use both WK1 and WK2 to use MessagePorts.
- Source/WebCore/loader/ResourceLoadObserver.cpp -6 / +6 lines
Lines 48-54 template<typename T> static inline Strin Source/WebCore/loader/ResourceLoadObserver.cpp_sec1
48
    return ResourceLoadStatistics::primaryDomain(value);
48
    return ResourceLoadStatistics::primaryDomain(value);
49
}
49
}
50
50
51
static Seconds timestampResolution { 1_h };
51
static Seconds timestampResolution { 5_s };
52
static const Seconds minimumNotificationInterval { 5_s };
52
static const Seconds minimumNotificationInterval { 5_s };
53
53
54
ResourceLoadObserver& ResourceLoadObserver::shared()
54
ResourceLoadObserver& ResourceLoadObserver::shared()
Lines 127-133 bool ResourceLoadObserver::shouldLog(Pag Source/WebCore/loader/ResourceLoadObserver.cpp_sec2
127
    return DeprecatedGlobalSettings::resourceLoadStatisticsEnabled() && !page->usesEphemeralSession() && m_notificationCallback;
127
    return DeprecatedGlobalSettings::resourceLoadStatisticsEnabled() && !page->usesEphemeralSession() && m_notificationCallback;
128
}
128
}
129
129
130
static WallTime reduceToHourlyTimeResolution(WallTime time)
130
static WallTime reduceTimeResolution(WallTime time)
131
{
131
{
132
    return WallTime::fromRawSeconds(std::floor(time.secondsSinceEpoch() / timestampResolution) * timestampResolution.seconds());
132
    return WallTime::fromRawSeconds(std::floor(time.secondsSinceEpoch() / timestampResolution) * timestampResolution.seconds());
133
}
133
}
Lines 170-176 void ResourceLoadObserver::logFrameNavig Source/WebCore/loader/ResourceLoadObserver.cpp_sec3
170
    if (targetHost != mainFrameHost
170
    if (targetHost != mainFrameHost
171
        && !(areDomainsAssociated(page, targetPrimaryDomain, mainFramePrimaryDomain) || areDomainsAssociated(page, targetPrimaryDomain, sourcePrimaryDomain))) {
171
        && !(areDomainsAssociated(page, targetPrimaryDomain, mainFramePrimaryDomain) || areDomainsAssociated(page, targetPrimaryDomain, sourcePrimaryDomain))) {
172
        auto& targetStatistics = ensureResourceStatisticsForPrimaryDomain(targetPrimaryDomain);
172
        auto& targetStatistics = ensureResourceStatisticsForPrimaryDomain(targetPrimaryDomain);
173
        targetStatistics.lastSeen = reduceToHourlyTimeResolution(WallTime::now());
173
        targetStatistics.lastSeen = reduceTimeResolution(WallTime::now());
174
        if (targetStatistics.subframeUnderTopFrameOrigins.add(mainFramePrimaryDomain).isNewEntry)
174
        if (targetStatistics.subframeUnderTopFrameOrigins.add(mainFramePrimaryDomain).isNewEntry)
175
            shouldCallNotificationCallback = true;
175
            shouldCallNotificationCallback = true;
176
    }
176
    }
Lines 227-233 void ResourceLoadObserver::logSubresourc Source/WebCore/loader/ResourceLoadObserver.cpp_sec4
227
    bool shouldCallNotificationCallback = false;
227
    bool shouldCallNotificationCallback = false;
228
    {
228
    {
229
        auto& targetStatistics = ensureResourceStatisticsForPrimaryDomain(targetPrimaryDomain);
229
        auto& targetStatistics = ensureResourceStatisticsForPrimaryDomain(targetPrimaryDomain);
230
        targetStatistics.lastSeen = reduceToHourlyTimeResolution(WallTime::now());
230
        targetStatistics.lastSeen = reduceTimeResolution(WallTime::now());
231
        if (targetStatistics.subresourceUnderTopFrameOrigins.add(mainFramePrimaryDomain).isNewEntry)
231
        if (targetStatistics.subresourceUnderTopFrameOrigins.add(mainFramePrimaryDomain).isNewEntry)
232
            shouldCallNotificationCallback = true;
232
            shouldCallNotificationCallback = true;
233
    }
233
    }
Lines 268-274 void ResourceLoadObserver::logWebSocketL Source/WebCore/loader/ResourceLoadObserver.cpp_sec5
268
        return;
268
        return;
269
269
270
    auto& targetStatistics = ensureResourceStatisticsForPrimaryDomain(targetPrimaryDomain);
270
    auto& targetStatistics = ensureResourceStatisticsForPrimaryDomain(targetPrimaryDomain);
271
    targetStatistics.lastSeen = reduceToHourlyTimeResolution(WallTime::now());
271
    targetStatistics.lastSeen = reduceTimeResolution(WallTime::now());
272
    if (targetStatistics.subresourceUnderTopFrameOrigins.add(mainFramePrimaryDomain).isNewEntry)
272
    if (targetStatistics.subresourceUnderTopFrameOrigins.add(mainFramePrimaryDomain).isNewEntry)
273
        scheduleNotificationIfNeeded();
273
        scheduleNotificationIfNeeded();
274
}
274
}
Lines 285-291 void ResourceLoadObserver::logUserIntera Source/WebCore/loader/ResourceLoadObserver.cpp_sec6
285
        return;
285
        return;
286
286
287
    auto domain = primaryDomain(url);
287
    auto domain = primaryDomain(url);
288
    auto newTime = reduceToHourlyTimeResolution(WallTime::now());
288
    auto newTime = reduceTimeResolution(WallTime::now());
289
    auto lastReportedUserInteraction = m_lastReportedUserInteractionMap.get(domain);
289
    auto lastReportedUserInteraction = m_lastReportedUserInteractionMap.get(domain);
290
    if (newTime == lastReportedUserInteraction)
290
    if (newTime == lastReportedUserInteraction)
291
        return;
291
        return;
- Source/WebCore/page/RuntimeEnabledFeatures.h +5 lines
Lines 244-249 public: Source/WebCore/page/RuntimeEnabledFeatures.h_sec1
244
    void setMediaCapabilitiesEnabled(bool isEnabled) { m_mediaCapabilitiesEnabled = isEnabled; }
244
    void setMediaCapabilitiesEnabled(bool isEnabled) { m_mediaCapabilitiesEnabled = isEnabled; }
245
    bool mediaCapabilitiesEnabled() const { return m_mediaCapabilitiesEnabled; }
245
    bool mediaCapabilitiesEnabled() const { return m_mediaCapabilitiesEnabled; }
246
246
247
    void setResourceLoadStatisticsDebugMode(bool isEnabled) { m_resourceLoadStatisticsDebugMode = isEnabled; }
248
    bool resourceLoadStatisticsDebugMode() const { return m_resourceLoadStatisticsDebugMode; }
249
247
    WEBCORE_EXPORT static RuntimeEnabledFeatures& sharedFeatures();
250
    WEBCORE_EXPORT static RuntimeEnabledFeatures& sharedFeatures();
248
251
249
private:
252
private:
Lines 373-378 private: Source/WebCore/page/RuntimeEnabledFeatures.h_sec2
373
376
374
    bool m_mediaCapabilitiesEnabled { false };
377
    bool m_mediaCapabilitiesEnabled { false };
375
378
379
    bool m_resourceLoadStatisticsDebugMode { false };
380
    
376
    friend class WTF::NeverDestroyed<RuntimeEnabledFeatures>;
381
    friend class WTF::NeverDestroyed<RuntimeEnabledFeatures>;
377
};
382
};
378
383
- Source/WebCore/page/Settings.yaml +3 lines
Lines 711-713 touchEventEmulationEnabled: Source/WebCore/page/Settings.yaml_sec1
711
711
712
mediaCapabilitiesEnabled:
712
mediaCapabilitiesEnabled:
713
  initial: false
713
  initial: false
714
715
resourceLoadStatisticsDebugMode:
716
  initial: false
- Source/WebKit/ChangeLog +35 lines
Lines 1-3 Source/WebKit/ChangeLog_sec1
1
2018-01-29  John Wilander  <wilander@apple.com>
2
3
        Resource Load Statistics: Introduce debug mode as experimental feature
4
        https://bugs.webkit.org/show_bug.cgi?id=182199
5
        <rdar://problem/36930364>
6
7
        Reviewed by NOBODY (OOPS!).
8
9
        The only changes to default behavior are:
10
        - Increased resolution on timestamps which is needed to be able to set shorter
11
          timeouts in debug mode.
12
        - Only update partitioning and blocking table when needed. This is an optimization
13
          which pays off in less XPC with shorter timeouts.
14
15
        * Shared/WebPreferences.yaml:
16
        * UIProcess/API/APIWebsiteDataStore.cpp:
17
        (API::WebsiteDataStore::resourceLoadStatisticsDebugMode const):
18
        (API::WebsiteDataStore::setResourceLoadStatisticsDebugMode):
19
        * UIProcess/API/APIWebsiteDataStore.h:
20
        * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
21
        (WKWebsiteDataStoreSetResourceLoadStatisticsDebugMode):
22
        * UIProcess/API/C/WKWebsiteDataStoreRef.h:
23
        * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
24
        (-[WKWebsiteDataStore _resourceLoadStatisticsDebugMode]):
25
        (-[WKWebsiteDataStore _setResourceLoadStatisticsDebugMode:]):
26
        * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
27
        * UIProcess/WebResourceLoadStatisticsStore.cpp:
28
        (WebKit::WebResourceLoadStatisticsStore::setResourceLoadStatisticsDebugMode):
29
        (WebKit::WebResourceLoadStatisticsStore::logUserInteraction):
30
        * UIProcess/WebResourceLoadStatisticsStore.h:
31
        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
32
        (WebKit::WebsiteDataStore::resourceLoadStatisticsDebugMode const):
33
        (WebKit::WebsiteDataStore::setResourceLoadStatisticsDebugMode):
34
        * UIProcess/WebsiteData/WebsiteDataStore.h:
35
1
2018-01-29  Brady Eidson  <beidson@apple.com>
36
2018-01-29  Brady Eidson  <beidson@apple.com>
2
37
3
        Make it possible for apps that use both WK1 and WK2 to use MessagePorts.
38
        Make it possible for apps that use both WK1 and WK2 to use MessagePorts.
- Source/WebKit/Shared/WebPreferences.yaml -1 / +9 lines
Lines 1193-1196 WebVREnabled: Source/WebKit/Shared/WebPreferences.yaml_sec1
1193
  humanReadableDescription: "WebVR Module support"
1193
  humanReadableDescription: "WebVR Module support"
1194
  webcoreBinding: RuntimeEnabledFeatures
1194
  webcoreBinding: RuntimeEnabledFeatures
1195
  category: experimental
1195
  category: experimental
1196
  condition: PLATFORM(GTK) || PLATFORM(WPE)
1196
  condition: PLATFORM(GTK) || PLATFORM(WPE)
1197
1198
ResourceLoadStatisticsDebugMode:
1199
type: bool
1200
defaultValue: false
1201
humanReadableName: "ITP Debug Mode"
1202
humanReadableDescription: "Intelligent Tracking Prevention Debug Mode"
1203
category: experimental
1204
webcoreBinding: RuntimeEnabledFeatures
- Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp -1 / +10 lines
Lines 365-370 void WebResourceLoadStatisticsStore::sub Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp_sec1
365
    });
365
    });
366
}
366
}
367
367
368
void WebResourceLoadStatisticsStore::setResourceLoadStatisticsDebugMode(bool enable)
369
{
370
    if (enable)
371
        setTimeToLiveCookiePartitionFree(30_s);
372
    else
373
        resetParametersToDefaultValues();
374
}
375
368
void WebResourceLoadStatisticsStore::logUserInteraction(const URL& url)
376
void WebResourceLoadStatisticsStore::logUserInteraction(const URL& url)
369
{
377
{
370
    if (url.isBlankURL() || url.isEmpty())
378
    if (url.isBlankURL() || url.isEmpty())
Lines 375-381 void WebResourceLoadStatisticsStore::log Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp_sec2
375
        statistics.hadUserInteraction = true;
383
        statistics.hadUserInteraction = true;
376
        statistics.mostRecentUserInteractionTime = WallTime::now();
384
        statistics.mostRecentUserInteractionTime = WallTime::now();
377
385
378
        updateCookiePartitioningForDomains({ }, { }, { primaryDomain }, ShouldClearFirst::No);
386
        if (statistics.isMarkedForCookiePartitioning || statistics.isMarkedForCookieBlocking)
387
            updateCookiePartitioningForDomains({ }, { }, { primaryDomain }, ShouldClearFirst::No);
379
    });
388
    });
380
}
389
}
381
390
- Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.h +2 lines
Lines 139-144 public: Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.h_sec1
139
    void clearInMemory();
139
    void clearInMemory();
140
    void grandfatherExistingWebsiteData(CompletionHandler<void()>&&);
140
    void grandfatherExistingWebsiteData(CompletionHandler<void()>&&);
141
141
142
    void setResourceLoadStatisticsDebugMode(bool);
143
142
    void setStatisticsTestingCallback(Function<void (const String&)>&& callback) { m_statisticsTestingCallback = WTFMove(callback); }
144
    void setStatisticsTestingCallback(Function<void (const String&)>&& callback) { m_statisticsTestingCallback = WTFMove(callback); }
143
    void logTestingEvent(const String&);
145
    void logTestingEvent(const String&);
144
146
- Source/WebKit/UIProcess/API/APIWebsiteDataStore.cpp +10 lines
Lines 95-100 void WebsiteDataStore::setResourceLoadSt Source/WebKit/UIProcess/API/APIWebsiteDataStore.cpp_sec1
95
    m_websiteDataStore->setResourceLoadStatisticsEnabled(enabled);
95
    m_websiteDataStore->setResourceLoadStatisticsEnabled(enabled);
96
}
96
}
97
97
98
bool WebsiteDataStore::resourceLoadStatisticsDebugMode() const
99
{
100
    return m_websiteDataStore->resourceLoadStatisticsDebugMode();
101
}
102
103
void WebsiteDataStore::setResourceLoadStatisticsDebugMode(bool enabled)
104
{
105
    m_websiteDataStore->setResourceLoadStatisticsDebugMode(enabled);
106
}
107
98
#if !PLATFORM(COCOA)
108
#if !PLATFORM(COCOA)
99
String WebsiteDataStore::defaultMediaCacheDirectory()
109
String WebsiteDataStore::defaultMediaCacheDirectory()
100
{
110
{
- Source/WebKit/UIProcess/API/APIWebsiteDataStore.h +2 lines
Lines 47-52 public: Source/WebKit/UIProcess/API/APIWebsiteDataStore.h_sec1
47
47
48
    bool resourceLoadStatisticsEnabled() const;
48
    bool resourceLoadStatisticsEnabled() const;
49
    void setResourceLoadStatisticsEnabled(bool);
49
    void setResourceLoadStatisticsEnabled(bool);
50
    bool resourceLoadStatisticsDebugMode() const;
51
    void setResourceLoadStatisticsDebugMode(bool);
50
52
51
    WebKit::WebsiteDataStore& websiteDataStore() { return m_websiteDataStore.get(); }
53
    WebKit::WebsiteDataStore& websiteDataStore() { return m_websiteDataStore.get(); }
52
    HTTPCookieStore& httpCookieStore();
54
    HTTPCookieStore& httpCookieStore();
- Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp +5 lines
Lines 63-68 bool WKWebsiteDataStoreGetResourceLoadSt Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp_sec1
63
    return WebKit::toImpl(dataStoreRef)->resourceLoadStatisticsEnabled();
63
    return WebKit::toImpl(dataStoreRef)->resourceLoadStatisticsEnabled();
64
}
64
}
65
65
66
void WKWebsiteDataStoreSetResourceLoadStatisticsDebugMode(WKWebsiteDataStoreRef dataStoreRef, bool enable)
67
{
68
    WebKit::toImpl(dataStoreRef)->setResourceLoadStatisticsDebugMode(enable);
69
}
70
66
void WKWebsiteDataStoreSetStatisticsLastSeen(WKWebsiteDataStoreRef dataStoreRef, WKStringRef host, double seconds)
71
void WKWebsiteDataStoreSetStatisticsLastSeen(WKWebsiteDataStoreRef dataStoreRef, WKStringRef host, double seconds)
67
{
72
{
68
    auto* store = WebKit::toImpl(dataStoreRef)->websiteDataStore().resourceLoadStatistics();
73
    auto* store = WebKit::toImpl(dataStoreRef)->websiteDataStore().resourceLoadStatistics();
- Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.h +1 lines
Lines 39-44 WK_EXPORT WKWebsiteDataStoreRef WKWebsit Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.h_sec1
39
39
40
WK_EXPORT bool WKWebsiteDataStoreGetResourceLoadStatisticsEnabled(WKWebsiteDataStoreRef dataStoreRef);
40
WK_EXPORT bool WKWebsiteDataStoreGetResourceLoadStatisticsEnabled(WKWebsiteDataStoreRef dataStoreRef);
41
WK_EXPORT void WKWebsiteDataStoreSetResourceLoadStatisticsEnabled(WKWebsiteDataStoreRef dataStoreRef, bool enable);
41
WK_EXPORT void WKWebsiteDataStoreSetResourceLoadStatisticsEnabled(WKWebsiteDataStoreRef dataStoreRef, bool enable);
42
WK_EXPORT void WKWebsiteDataStoreSetResourceLoadStatisticsDebugMode(WKWebsiteDataStoreRef dataStoreRef, bool enable);
42
WK_EXPORT void WKWebsiteDataStoreSetStatisticsLastSeen(WKWebsiteDataStoreRef dataStoreRef, WKStringRef host, double seconds);
43
WK_EXPORT void WKWebsiteDataStoreSetStatisticsLastSeen(WKWebsiteDataStoreRef dataStoreRef, WKStringRef host, double seconds);
43
WK_EXPORT void WKWebsiteDataStoreSetStatisticsPrevalentResource(WKWebsiteDataStoreRef dataStoreRef, WKStringRef host, bool value);
44
WK_EXPORT void WKWebsiteDataStoreSetStatisticsPrevalentResource(WKWebsiteDataStoreRef dataStoreRef, WKStringRef host, bool value);
44
typedef void (*WKWebsiteDataStoreIsStatisticsPrevalentResourceFunction)(bool isPrevalentResource, void* functionContext);
45
typedef void (*WKWebsiteDataStoreIsStatisticsPrevalentResourceFunction)(bool isPrevalentResource, void* functionContext);
- Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm +10 lines
Lines 234-239 - (void)_setResourceLoadStatisticsEnable Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm_sec1
234
    _websiteDataStore->websiteDataStore().setResourceLoadStatisticsEnabled(enabled);
234
    _websiteDataStore->websiteDataStore().setResourceLoadStatisticsEnabled(enabled);
235
}
235
}
236
236
237
- (BOOL)_resourceLoadStatisticsDebugMode
238
{
239
    return _websiteDataStore->websiteDataStore().resourceLoadStatisticsDebugMode();
240
}
241
242
- (void)_setResourceLoadStatisticsDebugMode:(BOOL)enabled
243
{
244
    _websiteDataStore->websiteDataStore().setResourceLoadStatisticsDebugMode(enabled);
245
}
246
237
- (NSUInteger)_cacheStoragePerOriginQuota
247
- (NSUInteger)_cacheStoragePerOriginQuota
238
{
248
{
239
    return _websiteDataStore->websiteDataStore().cacheStoragePerOriginQuota();
249
    return _websiteDataStore->websiteDataStore().cacheStoragePerOriginQuota();
- Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h +1 lines
Lines 45-50 typedef NS_OPTIONS(NSUInteger, _WKWebsit Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h_sec1
45
- (void)_fetchDataRecordsOfTypes:(NSSet<NSString *> *)dataTypes withOptions:(_WKWebsiteDataStoreFetchOptions)options completionHandler:(void (^)(NSArray<WKWebsiteDataRecord *> *))completionHandler;
45
- (void)_fetchDataRecordsOfTypes:(NSSet<NSString *> *)dataTypes withOptions:(_WKWebsiteDataStoreFetchOptions)options completionHandler:(void (^)(NSArray<WKWebsiteDataRecord *> *))completionHandler;
46
46
47
@property (nonatomic, setter=_setResourceLoadStatisticsEnabled:) BOOL _resourceLoadStatisticsEnabled WK_API_AVAILABLE(macosx(10.12), ios(10.0));
47
@property (nonatomic, setter=_setResourceLoadStatisticsEnabled:) BOOL _resourceLoadStatisticsEnabled WK_API_AVAILABLE(macosx(10.12), ios(10.0));
48
@property (nonatomic, setter=_setResourceLoadStatisticsDebugMode:) BOOL _resourceLoadStatisticsDebugMode WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
48
@property (nonatomic, setter=_setCacheStoragePerOriginQuota:) NSUInteger _cacheStoragePerOriginQuota WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
49
@property (nonatomic, setter=_setCacheStoragePerOriginQuota:) NSUInteger _cacheStoragePerOriginQuota WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
49
@property (nonatomic, setter=_setCacheStorageDirectory:) NSString* _cacheStorageDirectory WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
50
@property (nonatomic, setter=_setCacheStorageDirectory:) NSString* _cacheStorageDirectory WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
50
51
- Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp +11 lines
Lines 1413-1418 void WebsiteDataStore::setResourceLoadSt Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp_sec1
1413
        processPool->setResourceLoadStatisticsEnabled(false);
1413
        processPool->setResourceLoadStatisticsEnabled(false);
1414
}
1414
}
1415
1415
1416
bool WebsiteDataStore::resourceLoadStatisticsDebugMode() const
1417
{
1418
    return m_resourceLoadStatisticsDebugMode;
1419
}
1420
1421
void WebsiteDataStore::setResourceLoadStatisticsDebugMode(bool enabled)
1422
{
1423
    m_resourceLoadStatisticsDebugMode = enabled;
1424
    m_resourceLoadStatistics->setResourceLoadStatisticsDebugMode(enabled);
1425
}
1426
1416
void WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback(Function<void (const String&)>&& callback)
1427
void WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback(Function<void (const String&)>&& callback)
1417
{
1428
{
1418
    if (m_resourceLoadStatistics) {
1429
    if (m_resourceLoadStatistics) {
- Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h +3 lines
Lines 100-105 public: Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h_sec1
100
100
101
    bool resourceLoadStatisticsEnabled() const;
101
    bool resourceLoadStatisticsEnabled() const;
102
    void setResourceLoadStatisticsEnabled(bool);
102
    void setResourceLoadStatisticsEnabled(bool);
103
    bool resourceLoadStatisticsDebugMode() const;
104
    void setResourceLoadStatisticsDebugMode(bool);
103
105
104
    uint64_t cacheStoragePerOriginQuota() const { return m_resolvedConfiguration.cacheStoragePerOriginQuota; }
106
    uint64_t cacheStoragePerOriginQuota() const { return m_resolvedConfiguration.cacheStoragePerOriginQuota; }
105
    void setCacheStoragePerOriginQuota(uint64_t quota) { m_resolvedConfiguration.cacheStoragePerOriginQuota = quota; }
107
    void setCacheStoragePerOriginQuota(uint64_t quota) { m_resolvedConfiguration.cacheStoragePerOriginQuota = quota; }
Lines 197-202 private: Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h_sec2
197
199
198
    const RefPtr<StorageManager> m_storageManager;
200
    const RefPtr<StorageManager> m_storageManager;
199
    RefPtr<WebResourceLoadStatisticsStore> m_resourceLoadStatistics;
201
    RefPtr<WebResourceLoadStatisticsStore> m_resourceLoadStatistics;
202
    bool m_resourceLoadStatisticsDebugMode { false };
200
203
201
    Ref<WorkQueue> m_queue;
204
    Ref<WorkQueue> m_queue;
202
205

Return to Bug 182199