Skip to content
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

Handle shields settings properly #4624

Merged
merged 4 commits into from
Feb 21, 2020
Merged

Conversation

simonhong
Copy link
Member

@simonhong simonhong commented Feb 13, 2020

With this PR, Site Settings is renamed to Site and Shields Settings.

and shields settings are also cleared via clear browsing data dialog with all time range option.
So far, it is cleared with All time time range because browser clears whole plugin type data with this time range. With the specific time range, browser only clears with empty resource id(flash type).

and site counts properly calculated with BraveSiteSettingsCounter.
SiteSettingsCounter only counts flash resource from plugin type.

fix brave/brave-browser#8231
fix brave/brave-browser#8826

Screen Shot 2020-02-13 at 3 18 18 PM

Screen Shot 2020-02-13 at 3 18 47 PM

Submitter Checklist:

Test Plan:

npm run test brave_unit_tests -- --filter=BraveSiteSettingsCounterTest*
npm run test brave_unit_tests -- --filter= BraveBrowsingDataRemoverDelegateTest*
See reproduce step in the issue

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.

@simonhong simonhong added this to the 1.6.x - Nightly milestone Feb 13, 2020
@simonhong simonhong self-assigned this Feb 13, 2020
@simonhong simonhong force-pushed the handle_shields_settings_properly branch from 60e66b1 to d8a2e28 Compare February 13, 2020 06:17
@simonhong simonhong marked this pull request as ready for review February 13, 2020 09:08
@simonhong simonhong force-pushed the handle_shields_settings_properly branch from b1ab49c to a98fde1 Compare February 13, 2020 09:08
@simonhong
Copy link
Member Author

Kindly ping to reviewers :)

@bridiver bridiver closed this Feb 14, 2020
@bridiver bridiver reopened this Feb 14, 2020
@simonhong simonhong force-pushed the handle_shields_settings_properly branch from a98fde1 to a8042f4 Compare February 15, 2020 03:42
@simonhong simonhong requested a review from yrliou February 15, 2020 03:43
@simonhong simonhong force-pushed the handle_shields_settings_properly branch 2 times, most recently from fc8751f to bc989ef Compare February 16, 2020 23:12
Copy link
Member

@yrliou yrliou left a comment

Choose a reason for hiding this comment

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

LGTM just a few nits, please see the above comments, thanks.

@simonhong simonhong force-pushed the handle_shields_settings_properly branch from bc989ef to e551824 Compare February 18, 2020 23:21
@simonhong
Copy link
Member Author

Kindly ping to code owners @bridiver :)

Site Settings also includes shields settings.
So, "Site and Shields Settings" is more proper option name.
So far, shields settings are also cleard with "All time" time range.
With "All time" range option, browser nuke whole plugins type data.
With non "All time" range option, browser only clears plugins type for
empty resource ids which is flash type.
This commit makes browser clear shields data also with non "All time" range.
We don't need to subclass HostContentsSettingsMap to clear shields
settings. BraveBrowsingDataRemoverDelegateTest is added.
@simonhong simonhong force-pushed the handle_shields_settings_properly branch from e551824 to 294b7c1 Compare February 20, 2020 22:53
@simonhong simonhong added CI/skip-ios Do not run CI builds for iOS CI/skip-macos-x64 Do not run CI builds for macOS x64 CI/skip-android Do not run CI builds for Android CI/skip-linux and removed CI/skip-ios Do not run CI builds for iOS CI/skip-macos-x64 Do not run CI builds for macOS x64 labels Feb 21, 2020
@simonhong simonhong merged commit 7e22c2d into master Feb 21, 2020
@simonhong simonhong deleted the handle_shields_settings_properly branch February 21, 2020 04:14
@bsclifton
Copy link
Member

Nice job with this! 😎👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/skip-android Do not run CI builds for Android
Projects
None yet
4 participants