Bug 192592 - Resource Load Statistics: Use common implementation within NetworkStorageSession
Summary: Resource Load Statistics: Use common implementation within NetworkStorageSession
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Don Olmstead
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-12-11 09:12 PST by Don Olmstead
Modified: 2018-12-11 12:26 PST (History)
9 users (show)

See Also:


Attachments
Patch (20.92 KB, patch)
2018-12-11 09:20 PST, Don Olmstead
no flags Details | Formatted Diff | Diff
Patch (20.88 KB, patch)
2018-12-11 09:41 PST, Don Olmstead
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Don Olmstead 2018-12-11 09:12:22 PST
Currently there is a common implementation of ENABLE(RESOURCE_LOAD_STATISTICS) within NetworkStorageSessionCFNet.cpp that should go into NetworkStorageSession.
Comment 1 Don Olmstead 2018-12-11 09:20:04 PST
Created attachment 357054 [details]
Patch
Comment 2 Don Olmstead 2018-12-11 09:41:18 PST
Created attachment 357060 [details]
Patch
Comment 3 Michael Catanzaro 2018-12-11 09:47:49 PST
Yay!
Comment 4 Alex Christensen 2018-12-11 11:47:34 PST
Comment on attachment 357060 [details]
Patch

r=me
You should be aware that the high-level organization of resource load statistics is not where we want it to be.  I think right now it uses some strange combination of process pool and globals, and it needs some love and polish.
Comment 5 Michael Catanzaro 2018-12-11 12:15:04 PST
Comment on attachment 357060 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=357060&action=review

> Source/WebCore/platform/network/NetworkStorageSession.cpp:106
> +bool NetworkStorageSession::shouldBlockCookies(const ResourceRequest& request, std::optional<uint64_t> frameID, std::optional<uint64_t> pageID) const

Preexisting problem, but I presume passing std::optional by value is not best-practice? Should be const ref?
Comment 6 Chris Dumez 2018-12-11 12:17:44 PST
(In reply to Michael Catanzaro from comment #5)
> Comment on attachment 357060 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=357060&action=review
> 
> > Source/WebCore/platform/network/NetworkStorageSession.cpp:106
> > +bool NetworkStorageSession::shouldBlockCookies(const ResourceRequest& request, std::optional<uint64_t> frameID, std::optional<uint64_t> pageID) const
> 
> Preexisting problem, but I presume passing std::optional by value is not
> best-practice? Should be const ref?

I think we're OK with it for small types.
Comment 7 WebKit Commit Bot 2018-12-11 12:25:30 PST
Comment on attachment 357060 [details]
Patch

Clearing flags on attachment: 357060

Committed r239081: <https://trac.webkit.org/changeset/239081>
Comment 8 WebKit Commit Bot 2018-12-11 12:25:32 PST
All reviewed patches have been landed.  Closing bug.
Comment 9 Radar WebKit Bug Importer 2018-12-11 12:26:36 PST
<rdar://problem/46637456>