[Extensions] Improve semantic intersection of URLPatternSet
Improve the semantic intersection logic in URLPatternSet to utilize URLPattern::CreateIntersection(). This allows callers to create an intersection between two sets that will include patterns that were not explicitly in either set, such as constructing the pattern `http://chromium.org/*` from `http://*/*` and `*://chromium.org/*`. Since not all callers may want this behavior, and in order to introduce three separately named Create*Intersection methods in URLPatternSet, add an enum, IntersectionBehavior, for callers to specify the type of intersection behavior to use. This includes string comparison (STL-set-style intersection), patterns explicitly contained by both sets (the old semantic intersection), and detailed (the new and improved semantic intersection). Add unit tests for the same. Bug: 867549 Change-Id: Ic80bec8c8c8bbac188efcf2862d92582379c5a7c Reviewed-on: https://chromium-review.googlesource.com/1150919 Commit-Queue: Devlin <rdevlin.cronin@chromium.org> Reviewed-by:Karan Bhatia <karandeepb@chromium.org> Cr-Commit-Position: refs/heads/master@{#578731}
Showing
Please register or sign in to comment