Store PluginVM camera/mic permissions in auto-reset prefs
We are making the permissions persistent across chrome restarts, so we have to change the way the permissions are stored (currently, they are stored as member variables initialized to false). Note that this CL still resets the prefs values to false in `PluginVmManagerImpl::OnPrimaryUserProfilePrepared()` because the required permission indicators/notifications are not ready yet, so the behavior for now is actually going to be the same. This CL also fixes the bug that pressing <esc> key on the relaunch dialog does not recover the toggle state. This CL also simplfies the code by: * removing <plugin-vm-permission-dialog> --- it is simpler to use <cr-dialog> directly. * replacing `wouldPermissionChangeRequireRelaunch()` with `isRelaunchNeededForNewPermissions()` --- The toggle is the only way the user can change the value, so there is no need for the c++ code to check whether the values are actually different. Bug: b/167491603 Change-Id: I423e1d03db6e4d2b52fefc052c22eb4f27733425 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2488262 Commit-Queue: Jason Lin <lxj@google.com> Reviewed-by:Jeevan Shikaram <jshikaram@chromium.org> Reviewed-by:
calamity <calamity@chromium.org> Reviewed-by:
Steven Bennetts <stevenjb@chromium.org> Reviewed-by:
Joel Hockey <joelhockey@chromium.org> Reviewed-by:
Daniel Ng <danielng@google.com> Cr-Commit-Position: refs/heads/master@{#821080}
Showing
This diff is collapsed.
Please register or sign in to comment