-
Notifications
You must be signed in to change notification settings - Fork 868
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
Make shields settings persist #558
Conversation
940d796
to
6d6369a
Compare
For now, this test is failed. Need to make this test pass.
BravePrefProvider and BraveEphemeralProvider make shields configuration persistent.
IsShieldsResourceID(resource_identifier)) { | ||
return false; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we have a DCHECK here to ensure resource_identifier is empty?
I think that will prevent a future bug when we add a new content setting type and forget to add it in the list of IsShieldsResourceID
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
const ResourceIdentifier& resource_identifier, | ||
base::Value* in_value) { | ||
// Flash type shouldn't be handled here. Its id is empty. | ||
// It's type is plugin and id is empty string. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this comment has some redundancy with "Its id is empty" and " id is empty string" making the reader think there are 2 ids, but I think there is only one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
BraveEphemeralProvider should not handle shield settings.
e02f6f5
to
e652fc6
Compare
So far, shields settings are reset after reboot because plugin content type isn't persisted by default.(except default setting).
Our new BravePrefProvider and BraveEphemeralProvider handles to store our plugin type settings to disk.
Close brave/brave-browser#1364
Submitter Checklist:
git rebase -i
to squash commits (if needed).Test Plan:
yarn test brave_browser_tests --filter=
BraveShieldsAPIBrowserTest.ShieldsSettingsPersistTest`Reviewer Checklist: