std::optional<ObservationDelayController::PageStabilityConfig>
page_stability_config) {
Can you change `Tool::GetObservationDelayer` to take a `PageStabilityConfig` (and not a `std::optional`)? Working back up the stack to where the optional is set might be a useful exercise. I think with certain features set the `value()` calls you're adding will cause crashes?
https://source.chromium.org/chromium/chromium/src/+/main:chrome/common/actor/actor_utils.cc;l=11-19;drc=62a9a00176f862e688fa47919ed6f19b59f77b5f
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
std::optional<ObservationDelayController::PageStabilityConfig>
page_stability_config) {
Can you change `Tool::GetObservationDelayer` to take a `PageStabilityConfig` (and not a `std::optional`)? Working back up the stack to where the optional is set might be a useful exercise. I think with certain features set the `value()` calls you're adding will cause crashes?
https://source.chromium.org/chromium/chromium/src/+/main:chrome/common/actor/actor_utils.cc;l=11-19;drc=62a9a00176f862e688fa47919ed6f19b59f77b5f
Done. I had to revise the `ObservationDelayController::PageStabilityConfig` struct to have an additional .enabled field set to false by default to indicate whether page stability monitoring is enabled (which is used instead of returning `std::nullopt` in `ToolRequest::GetObservationPageStabilityConfig()`).
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if (UseGeneralPageStabilityNavigationTools()) {
config.enabled = true;
}
With an enabled/disabled bit in `PageStabilityConfig` now, should this check happen during the construction of that object rather than everywhere that constructs one?
// Whether to enable page stability monitoring at all.
bool enabled = false;
I'll look more closely at this change next week, but are you sure you need/want to do this? What does this get you over having a `std::optional<ObservationDelayController>` that's `nullopt` when page stability is disabled?
Is it not enough to just return an `ObservationDelayController` from the `TabManagementTool` and make the change to `ObservationDelayController::Wait()`.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |