| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +0 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
I'm OOO this week, and iclelland is no longer working in this area. Added alternative reviewers for an initial stab.
(I know Annie took a quick look last Friday and wondered about handling reporting for background->foreground paints potentially reporting all of the background time as paint latency?)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
PTAL
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
For now, please consider this a question about the design, and let me know what you think. It is quite possible that what you have is better than the strawman I'm suggesting, but if so, I'd like to learn why please. :-)
GetNavigationTypeSuffix(nav_scenario_)}),The way I understand this, this enum value `nav_scenario_` distinguishes different "types" of page loads.
The place where we figure out which type of page load something is is in the PageLoadTracker, and it doesn't change per page load, which is why in this changelist, it's getting passed into the observer when its constructed. And page_load_metrics_initialize.cc and page_load_metrics_embedder_base.cc wire that up.
I can see that this works.
However:
It's problematic that this observer and the page load tracker are going to be very tightly coupled, via these aforementioned mechanisms, and when some other observer needs this information, they'll also be very tightly coupled. Worst case in a way, if the enum gets very popular (this is not guaranteed), things would turn into a hairball.
What do you think about the following:
1) Add some accessor to PageLoadMetricsObserverDelegate to get the nav scenario enum value. GetNavScenario (or whatever is a descriptive name).
2) In page_load_tracker.{h,cc}, override and implement the accessor. If needed, you can add a field to PageLoadTracker to store it there. If the tracker must get it from the page_load_metrics_initialize.cc file, I guess that's OK, perhaps you can look into what's a reasonable way to accomplish that? (e.g., with some precedents?)
3) In this file, get the value with GetDelegate().GetNavScenario() (instead of nav_scenario_).
The advantage would be that there's no tight coupling and uma_page_load_metrics_observer.cc would not become special and require doing stuff to the embedder and/or initialization code.
What do you think?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
PTAL
The way I understand this, this enum value `nav_scenario_` distinguishes different "types" of page loads.
The place where we figure out which type of page load something is is in the PageLoadTracker, and it doesn't change per page load, which is why in this changelist, it's getting passed into the observer when its constructed. And page_load_metrics_initialize.cc and page_load_metrics_embedder_base.cc wire that up.
I can see that this works.
However:
It's problematic that this observer and the page load tracker are going to be very tightly coupled, via these aforementioned mechanisms, and when some other observer needs this information, they'll also be very tightly coupled. Worst case in a way, if the enum gets very popular (this is not guaranteed), things would turn into a hairball.
What do you think about the following:
1) Add some accessor to PageLoadMetricsObserverDelegate to get the nav scenario enum value. GetNavScenario (or whatever is a descriptive name).
2) In page_load_tracker.{h,cc}, override and implement the accessor. If needed, you can add a field to PageLoadTracker to store it there. If the tracker must get it from the page_load_metrics_initialize.cc file, I guess that's OK, perhaps you can look into what's a reasonable way to accomplish that? (e.g., with some precedents?)
3) In this file, get the value with GetDelegate().GetNavScenario() (instead of nav_scenario_).
The advantage would be that there's no tight coupling and uma_page_load_metrics_observer.cc would not become special and require doing stuff to the embedder and/or initialization code.
What do you think?
Done. Introduced `GetNavigationScenario()` `components/page_load_metrics/browser/navigation_scenario.h`. Please let me know if this is the desired direction.
The way I understand this, this enum value `nav_scenario_` distinguishes different "types" of page loads.
The place where we figure out which type of page load something is is in the PageLoadTracker, and it doesn't change per page load, which is why in this changelist, it's getting passed into the observer when its constructed. And page_load_metrics_initialize.cc and page_load_metrics_embedder_base.cc wire that up.
I can see that this works.
However:
It's problematic that this observer and the page load tracker are going to be very tightly coupled, via these aforementioned mechanisms, and when some other observer needs this information, they'll also be very tightly coupled. Worst case in a way, if the enum gets very popular (this is not guaranteed), things would turn into a hairball.
What do you think about the following:
1) Add some accessor to PageLoadMetricsObserverDelegate to get the nav scenario enum value. GetNavScenario (or whatever is a descriptive name).
2) In page_load_tracker.{h,cc}, override and implement the accessor. If needed, you can add a field to PageLoadTracker to store it there. If the tracker must get it from the page_load_metrics_initialize.cc file, I guess that's OK, perhaps you can look into what's a reasonable way to accomplish that? (e.g., with some precedents?)
3) In this file, get the value with GetDelegate().GetNavScenario() (instead of nav_scenario_).
The advantage would be that there's no tight coupling and uma_page_load_metrics_observer.cc would not become special and require doing stuff to the embedder and/or initialization code.
What do you think?
Done. Introduced `GetNavigationScenario()` and made NavigationScenario into a standalone file.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |