-
Notifications
You must be signed in to change notification settings - Fork 887
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 origin-based permission lifetime support #8378
Conversation
86faf7c
to
1eab63a
Compare
browser/permissions/chrome_permission_origin_lifetime_monitor.h
Outdated
Show resolved
Hide resolved
browser/permissions/chrome_permission_origin_lifetime_monitor.h
Outdated
Show resolved
Hide resolved
browser/permissions/chrome_permission_origin_lifetime_monitor.cc
Outdated
Show resolved
Hide resolved
browser/permissions/chrome_permission_origin_lifetime_monitor.cc
Outdated
Show resolved
Hide resolved
5f1b47a
to
eb6200a
Compare
@@ -35,7 +37,9 @@ class PermissionLifetimeManager : public KeyedService, | |||
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | |||
|
|||
PermissionLifetimeManager(HostContentSettingsMap* host_content_settings_map, | |||
PrefService* prefs); | |||
PrefService* prefs, |
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.
missing either an include or forward decl for PrefService
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.
it's right here:
class PrefService; |
auto it = active_tld_storage_areas().find(key); | ||
DCHECK(it == active_tld_storage_areas().end() || it->second.get()); | ||
return it != active_tld_storage_areas().end() ? it->second.get() : nullptr; | ||
const TLDEphemeralLifetimeKey key(browser_context, std::move(storage_domain)); |
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.
same, const&
instead of std::move and you still only have one copy operation inside TLDEphemeralLifetimeKey
.github/CODEOWNERS
Outdated
@@ -69,6 +69,10 @@ components/weekly_storage/ @iefremov | |||
# Perf predictor | |||
components/brave_perf_predictor/ @iefremov | |||
|
|||
# Permissions | |||
browser/permissions/ @akhoroshilov |
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.
we really need to avoid having entire components blocked on one person, can you restrict this to just critical parts of the code and/or add more people?
As discussed in Slack, the origin-based permission lifetime ( @goodov when you next get online, mind please getting that started? So as not to block that effort, I started testing on /cc @kjozwiak Verified the following 3 cases with this
Case 1: Origin-based behavior, multiple tabs (location):
Case 2: Origin-based behavior, leave tab open, restart (MIDI):
Case 3: Origin-based behavior, close tab, open new tab (MIDI):
|
Added an integration of the ephemeral origin lifetime tracking with the permission revoke mechanism.
This is a second PR, should be merged on top of the first one.
Resolves 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: