UrlMatcher: Initialize SubstringSetMatcher with patterns.
This CL changes SubstringSetMatcher to require patterns as part of its constructor. This: - Simplifies the interface and the contract with the client. SubstringSetMatcher doesn't refer to memory owned by client anymore. - Reduces the need for storing the pattern vector in both SubstringSetMatcher and its clients, thereby reducing runtime memory usage. Also, modernize the code a bit, e.g. - Don't take references to primitives. - Use for-each loops when possible. This shouldn't introduce any behavior change. BUG=974391 Change-Id: Ie6cf1e7c08507b7eaccff39626d43062383e1383 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2038075 Commit-Queue: Karan Bhatia <karandeepb@chromium.org> Reviewed-by:Dominic Battré <battre@chromium.org> Cr-Commit-Position: refs/heads/master@{#739067}
Showing
Please register or sign in to comment