Remove FrameData class in the AdsPageLoadMetricsObserver.
This CL removes the FrameData class entirely, favoring small subclasses AggregateFrameData and FrameTreeData that do the various types of computations and repeating some of the high-level functionality to call those subclasses correctly in each class. It organizes all of the data into a FrameData namespace for easily containing/referencing it and not having it pollute the namespace and most/many of the enums are moved out of the classes to sit in that namespace for general referencing. It also removes main_frame_data from the APLMO, in favor of storing the portions of it we wish to know about in aggregate_frame_data as computational components using the subclasses. It also moves the collection of current memory usage for individual frames to sit under APLMO, much like the resource tracking information already does, to make memory collection more generic and so we don't store multiple maps, some of which contain only one entry. After this, there are still a few more minor clean-ups that could potentially be done: 1) Uniformity around naming accessors and updaters, as right now we use some combination of GetValueType/value_type and UpdateValueType/ set_value_type. I've done some fixing of this in this CL, but more could be done. 2) Migration of Heavy Ads logic out of FrameData. This should really be performed as part of APLMO, but it sits in FrameData right now. 3) Migration of UKM reporting out of FrameData. We report all UMA in APLMO but report UKM as part of FrameData, and they should both be done at the same level, presumably in APLMO. 4) Remove kAnyVisibility in favor of accessors that just add the two visibilities together, as this would simplify the logic in many areas where we loop over two visibilities ("any" and the appropriate one) setting them both, rather than just setting one. Bug: 1136068 Change-Id: Id65950726064b5a52ff08db21bf4e988339427a6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2496201 Commit-Queue: Eric Robinson <ericrobinson@chromium.org> Reviewed-by:John Delaney <johnidel@chromium.org> Reviewed-by:
Josh Karlin <jkarlin@chromium.org> Cr-Commit-Position: refs/heads/master@{#825002}
Showing
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment