-
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
Add permission lifetime backend. #8275
Conversation
54af4f5
to
23aaccb
Compare
@goodov Sorry for the late response. I'll review today! |
PTAL. It's ready. |
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.
++ for me. Only have trivial nits. 👍
chromium_src/chrome/browser/ui/views/permission_bubble/permission_prompt_bubble_view.cc
Outdated
Show resolved
Hide resolved
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.
patches/chromium_src looks ok, but there are some missing dep issues
Implement permission lifetime logic to track permissions lifetime and revoke them when required.
This change implements time-related aspect of brave/brave-browser#14126, i.e. it handles different lifetime options (24 hrs, 7 days, etc), but does not include support for "permission for this session" aka "revoke permission when all
WebContents
with eTLD+1 are closed".The overall logic consists of these steps:
PermissionPromptBubble
to set permission lifetime in allPermissionRequest
s currently presented to a user.PermissionLifetimeManager
(with all permission data, including content type, origins, lifetime).PermissionExpirations
).PermissionLifetimeManager
).PermissionLifetimeManager
).HostContentSettingsMap
to handle any permission changes not triggered via permission prompt dialogs (e.g. manually via Settings or via Page Info UI). This is required to properly update/stop the timer and clean up prefs for permissions we don't need to control anymore (PermissionLifetimeManager
).brave/brave-browser#14126
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
,npm run lint
,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan: