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

add callbacks for extension set* methods #3048

Merged
merged 1 commit into from Jul 31, 2019
Merged

add callbacks for extension set* methods #3048

merged 1 commit into from Jul 31, 2019

Conversation

@bridiver
Copy link
Collaborator

bridiver commented Jul 30, 2019

change brave shields method names for clarity
fix brave/brave-browser#5470

Submitter Checklist:

Test Plan:

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.
@bridiver bridiver self-assigned this Jul 30, 2019
@bridiver bridiver added this to the 0.70.x - Nightly milestone Jul 30, 2019
@bridiver bridiver force-pushed the issues/5470 branch from e35ebb3 to 22ad312 Jul 30, 2019
onToggleShields = (event: React.ChangeEvent<HTMLInputElement>) => {
const shieldsOption: BlockOptions = getToggleStateViaEventTarget(event)
onToggleShieldsMain = (event: React.ChangeEvent<HTMLInputElement>) => {
const shieldsOption: BlockOptions = event.target.checked ? 'allow' : 'block'

This comment has been minimized.

Copy link
@cezaraugusto

cezaraugusto Jul 30, 2019

Contributor

this is exactly what getToggleStateViaEventTarget does. can we keep it?

This comment has been minimized.

Copy link
@bridiver

bridiver Jul 31, 2019

Author Collaborator

getToggleStateViaEventTarget was super confusing to me because in all other cases it returns the wrong value and then has to be switched back with toggleShieldsValue

export const setAllowTrackers = (origin: string, setting: string) =>
chrome.braveShields.setAdControlTypeAsync(setting, origin)
export const setAllowTrackers = (origin: string, setting: string) => {
return chrome.braveShields.setAdControlTypeAsync(setting, origin)

This comment has been minimized.

Copy link
@cezaraugusto

cezaraugusto Jul 30, 2019

Contributor

I don't think we need to return anything here

This comment has been minimized.

Copy link
@bridiver

bridiver Jul 31, 2019

Author Collaborator

we actually do need to return the promise here, but the return is implicit so could be removed

Copy link
Member

SergeyZhukovsky left a comment

++

@bridiver bridiver force-pushed the issues/5470 branch 2 times, most recently from 95fe189 to f28339a Jul 30, 2019
change brave shields method names for clarity
fix brave/brave-browser#5470
Copy link
Member

SergeyZhukovsky left a comment

++

@bridiver bridiver merged commit 785d4f2 into master Jul 31, 2019
2 checks passed
2 checks passed
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@bsclifton bsclifton deleted the issues/5470 branch Aug 6, 2019
@bridiver bridiver modified the milestones: 0.70.x - Dev, 0.69.x - Beta Aug 27, 2019
@bsclifton
Copy link
Member

bsclifton commented Sep 12, 2019

Updating milestone to 0.70 as this was merged with 785d4f2

Visible in commit log here:
https://github.com/brave/brave-core/commits/0.70.x?before=9dc746c3409a180de9b0216367797f4bb5c9b892+280

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

5 participants
You can’t perform that action at this time.