[Extensions] Make activeTab sticky while on same origin
An extension is granted activeTab permission when the user invokes it on a certain site. Currently, this grants host permission to the extension until the user performs a (not-same-document) navigation or closes the tab. With RuntimeHostPermissions, we apply a similar model to extensions with withheld permissions, but make the permission grant "sticky" while the user is on the same origin - that is, the permission is only revoked on cross-origin navigation or tab close. Apply this behavior to activeTab as well. There's not really an increased security risk here, since the extension already has access to the site. This also simplifies the code by reducing the differences between activeTab and RuntimeHostPermissions. Update tests for activeTab to reflect the new behavior, and update public documentation to include the change. Bug: 898617 Change-Id: I6772cf7d88ed53ceb4540e06adf33d5f17bbb4b0 Reviewed-on: https://chromium-review.googlesource.com/c/1298420Reviewed-by:Karan Bhatia <karandeepb@chromium.org> Commit-Queue: Devlin <rdevlin.cronin@chromium.org> Cr-Commit-Position: refs/heads/master@{#604805}
Showing
Please register or sign in to comment