Skip to content

Sync ephemeral and first party storage cleanup #18331

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 8, 2023
Merged

Sync ephemeral and first party storage cleanup #18331

merged 5 commits into from
Jun 8, 2023

Conversation

goodov
Copy link
Member

@goodov goodov commented May 2, 2023

Changes in this PR:

  1. Move cleanup logic from TLDEphemeralLifetime into EphemeralStorageService.
  2. Put the actual cleanup calls into BraveEphemeralStorageServiceDelegate which is now located in //brave/browser. This allows us to cleanup //chrome-declared bits.
  3. Remove FirstPartyStorageLifetime as TLDEphemeralLifetime now triggers the cleanup event for both EphemeralStorage and ForgetFirstPartyByDefault features.
  4. Fix "Shields off" is not working for FBD before page close/reload.

Resolves brave/brave-browser#30090
Resolves brave/brave-browser#30330

Submitter Checklist:

  • I confirm that no security/privacy review is needed, or that I have requested one
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Squashed any review feedback or "fixup" commits before merge, so that history is a record of what happened in the repo, not your PR
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally:
    • npm run test -- brave_browser_tests, npm run test -- brave_unit_tests wiki
    • npm run lint, npm run presubmit wiki, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

Per discussion via https://bravesoftware.slack.com/archives/CHGKGMHDJ/p1687362687017369?thread_ts=1680615454.570509&cid=CHGKGMHDJ, the test plan for this one is:

  1. Test cases 1-9 of Enable BraveForgetFirstPartyStorage on nightly desktop. brave-variations#567 (comment) (general "Forget by default" test cases)
  2. Ephemeral storage specific checks as described in [FBD] Synchronize ephemeral and first party storage cleanup event brave-browser#30090 (comment)

@goodov goodov self-assigned this May 2, 2023
@github-actions github-actions bot added the CI/run-network-audit Run network-audit label May 2, 2023
@goodov goodov force-pushed the issues/30090 branch 3 times, most recently from aee2b89 to 5c12c1e Compare May 4, 2023 10:03
@goodov goodov force-pushed the issues/30090 branch 2 times, most recently from 60a276f to ee5e1f6 Compare May 18, 2023 15:19
@goodov goodov changed the title Perform ephemeral and first party storage cleanup at the same time. Sync ephemeral and first party storage cleanup May 18, 2023
@goodov goodov marked this pull request as ready for review May 19, 2023 14:17
@goodov goodov requested a review from a team as a code owner May 19, 2023 14:17
@goodov goodov requested a review from iefremov May 19, 2023 14:17
namespace permissions {
class PermissionLifetimeManagerBrowserTest;
}

namespace ephemeral_storage {

// Service to enable or disable first party ephemeral storage from external
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not only "first party" now?

@goodov goodov merged commit 0bba42b into master Jun 8, 2023
@goodov goodov deleted the issues/30090 branch June 8, 2023 13:40
@github-actions github-actions bot added the CI/run-upstream-tests Run upstream unit and browser tests on Linux and Windows (otherwise only on Linux) label Jun 8, 2023
@github-actions github-actions bot added this to the 1.54.x - Nightly milestone Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/run-network-audit Run network-audit CI/run-upstream-tests Run upstream unit and browser tests on Linux and Windows (otherwise only on Linux)
Projects
None yet
2 participants