[Extensions Click-to-Script] Support URL patterns in the extensions page
Rather than only displaying hosts, display the actual URLPatterns granted to an extension. Given this is a power-user surface, we can be a little less concerned with the technicality shown. Additionally, since we don't use a full string (e.g., "Read and change your data on all google.com sites"), we need to have the differentiation of which hosts the extension is granted, such as whether it includes subdomains. Also allow the user to enter patterns as an URLPattern (thus including subdomains if they so desire). Enforce that paths are always '*', since we don't use path-based permissions. To make it easier on users, also support just entering the host name (e.g., 'google.com'), which will be expanded to '*://google.com/*'. This also properly fixes the issue of clicking 'remove' or 'edit' on existing host options. Add JS tests for pattern validation, and update unittests to support pattern-based host manipulation. Bug: 844128 Change-Id: I599151bb6b89bdb113af4c39dcf0e21d152aa0fe Reviewed-on: https://chromium-review.googlesource.com/1166596 Commit-Queue: Devlin <rdevlin.cronin@chromium.org> Reviewed-by:Karan Bhatia <karandeepb@chromium.org> Reviewed-by:
Steven Bennetts <stevenjb@chromium.org> Cr-Commit-Position: refs/heads/master@{#585299}
Showing
Please register or sign in to comment