Skip to content

Conversation

@ohall-m
Copy link

@ohall-m ohall-m commented Dec 19, 2025

This patch adds functionality to use the new GeckoPref's PreviousState.

It adds:

  • set_gecko_prefs_original_values for external handling of setting prefs back to original values
  • Mechanisms to return to a previous states when:
    • on_experiment_updated
      • Certain situations and as determined in will_pref_experiment_change
    • on_experiment_ended
    • on_opt_out

Current WIP based on: 40275a1 December, 19 2025 #7122.

Pull Request checklist

  • Breaking changes: This PR follows our breaking change policy
    • This PR follows the breaking change policy:
      • This PR has no breaking API changes, or
      • There are corresponding PRs for our consumer applications that resolve the breaking changes and have been approved
  • Quality: This PR builds and tests run cleanly
    • Note:
      • For changes that need extra cross-platform testing, consider adding [ci full] to the PR title.
      • If this pull request includes a breaking change, consider cutting a new release after merging.
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry in CHANGELOG.md or an explanation of why it does not need one
    • Any breaking changes to Swift or Kotlin binding APIs are noted explicitly
  • Dependencies: This PR follows our dependency management guidelines
    • Any new dependencies are accompanied by a summary of the due diligence applied in selecting them.

@ohall-m ohall-m marked this pull request as draft December 19, 2025 19:58
@ohall-m ohall-m changed the title Bug 1997373 - Store original pref values for Fenix Gecko integration WIP Bug 1997373 - Store original pref values for Fenix Gecko integration Dec 19, 2025
@ohall-m ohall-m changed the title WIP Bug 1997373 - Store original pref values for Fenix Gecko integration WIP Bug 2003370 - Use and react to Gecko preferences stored values Dec 19, 2025
This patch begins storing a `PreviousState` on `ExperimentEnrollment` when it is of type `EnrollmentStatus::Enrolled`.
It also introduces `PreviousState::GeckoPref` to hold Gecko original preference values
for Gecko pref based experiments.

The public APIs it opens are `registerPreviousGeckoPrefStates` and `getPreviousState`.
@ohall-m ohall-m changed the title WIP Bug 2003370 - Use and react to Gecko preferences stored values WIP: Bug 2003370 - Use and react to Gecko preferences stored values Dec 19, 2025
This patch adds functionality to use the new GeckoPref's PreviousState.

It adds:
* `set_gecko_prefs_original_values` for external handling of setting prefs back to original values
* Mechanisms to return to a previous states when:
    * `on_experiment_updated`
    * Certain situations and as determined in `will_pref_experiment_change`
    * `on_experiment_ended`
    * `on_opt_out`
@ohall-m
Copy link
Author

ohall-m commented Dec 19, 2025

Moved to #7135 now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant