Extensions: Better URLPattern intersections |
||
Issue descriptionWe need to add support for better URLPattern intersection determination in order to handle issue 867547. For instance, the intersection of http://*/maps and *://google.com/* should be http://google.com/maps.
,
Jul 27
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6d16f50c987d497132f22b1f69d04525be757c39 commit 6d16f50c987d497132f22b1f69d04525be757c39 Author: Devlin Cronin <rdevlin.cronin@chromium.org> Date: Fri Jul 27 18:55:38 2018 [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} [modify] https://crrev.com/6d16f50c987d497132f22b1f69d04525be757c39/extensions/common/manifest_handlers/automation.cc [modify] https://crrev.com/6d16f50c987d497132f22b1f69d04525be757c39/extensions/common/permissions/permission_set.cc [modify] https://crrev.com/6d16f50c987d497132f22b1f69d04525be757c39/extensions/common/url_pattern_set.cc [modify] https://crrev.com/6d16f50c987d497132f22b1f69d04525be757c39/extensions/common/url_pattern_set.h [modify] https://crrev.com/6d16f50c987d497132f22b1f69d04525be757c39/extensions/common/url_pattern_set_unittest.cc
,
Aug 31
|
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Jul 27