Add telemetry to track storage access API adoption
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Jan 2018 23:12:03 +0000 (23:12 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Jan 2018 23:12:03 +0000 (23:12 +0000)
commitf93ead3bd077f248018e24967d1b172148b8791e
treeaa56988be339557d10b0a2928931b13a29656c27
parent25895b92bea5cf5e597793338fcb740a0df21f13
Add telemetry to track storage access API adoption
https://bugs.webkit.org/show_bug.cgi?id=182197
<rdar://problem/35803309>

Reviewed by Chris Dumez.

Part 2: Add telemetry for the Storage Access API case

Source/WebCore:

Adds a new convenience method to identify origin/page/frame combinations that
have been granted access to the Storage Access API. This is used for debug
logging in the NetworkProcess. It is not used in production builds.

* platform/network/NetworkStorageSession.h:
* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::NetworkStorageSession::hasStorageAccessForFrame const): Added.

Source/WebKit:

This change increments a counter when an origin is loaded in a first part context because
it was granted Storage Access API permissions.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::logCookieInformation const): Add logging to indicate
loads that happened with the Storage Access API enabled.
* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::requestStorageAccess): Increment counter for
loads using the new API.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227860 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/network/NetworkStorageSession.h
Source/WebCore/platform/network/cf/NetworkStorageSessionCFNet.cpp
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp
Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp