-
Notifications
You must be signed in to change notification settings - Fork 879
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
Allow users to be able to change content settings set by shield extension. #439
Conversation
3dfed08
to
86913dc
Compare
@yrliou |
86913dc
to
2c6e70d
Compare
They're not needed if we're not using content settings store anymore. |
This PR might also fix brave/brave-browser#1198 - going to build locally and verify 😄 |
Confirmed this does NOT fix brave/brave-browser#1198 |
Spending some more time with this given global shield settings landed.
2c6e70d
to
040a3a2
Compare
Rebased and |
Newly addied apis set content settings to user preference instead of ContentSettingsStore. Also, previously set value in extension's ContentSettingsStore is deleted when user changes current setting.
brave-extension doesn't use ContentSettingsStore for shields configuration.
040a3a2
to
28e1ef0
Compare
Force pushed rebase on master tip fyi. |
Code looks good, tested and it works great too. Tested against default shield settings and it is good too. |
Allow users to be able to change content settings set by shield extension.
Allow users to be able to change content settings set by shield extension.
If a setting is not managed by user, editing isn't allowed by the most of user interface.
Because of this reason, users can't edit javascript block settings from settings webui or page info bubble.
To enable editing the shields setting, newly introduced
BraveShields.ContentSetting
will store shields's content settings to user preference store.Note: We are using two different apis for storing shields's setting.
In shields,
ContentsSettingsStore::SetExtensionContentSetting
is used byContentSettingsContentSettingSetFunction
.In other places, methods of
HostContentSettingsMap
are used.Each uses different persistent storage.
With this PR, we will use one api -
HostContentSettingsMap
for setting.This PR doesn't change any behavior w/o brave/brave-extension#63.
Issue: brave/brave-browser#232
Submitter Checklist:
git rebase -i
to squash commits (if needed).Test Plan:
yarn test brave_browser_tests --filter=BraveShieldsAPIBrowserTest.ContentSetting*
Reviewer Checklist: