[go: nahoru, domu]

[Extensions] Factor Extension out of PermissionsData::PolicyDelegate

Refactor PermissionsData::PolicyDelegate::CanExecuteScriptOnPage to no
longer rely on being passed an extension. Instead, rename it to
IsRestrictedUrl(), and call it from the method of the same name in
PermissionsData. PermissionsData::IsRestrictedUrl() already checks if
the extension can execute script everywhere, so the check is no longer
necessary in the policy delegate. Additionally, this is ensures that
places checking if an url is restricted also check with the delegate.

Bug: 842270
Change-Id: Ica4c086d1315f9512cc908542841bf8dee2bedee
Reviewed-on: https://chromium-review.googlesource.com/1055930
Reviewed-by: Karan Bhatia <karandeepb@chromium.org>
Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558083}
4 files changed