Legacy cookie access content settings: Only construct GURL if needed
This change delays the construction of the GURL (representing the cookie domain, which is used to match against the ContentSettingPatterns in the Legacy cookie access content setting), until it is determined that it is actually needed. In particular, if the content settings for that type do not contain any domain-specific settings, we don't actually need to do any URL matching since any URL will match. In these cases, we can skip constructing the GURL since that can be expensive. This optimization only works for the network implementation of CookieSettings, not for the components/content_settings implementation of CookieSettings. Bug: 1014715 Change-Id: If6535290671b28811f84922ec05c0be58e00bc6f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1865754 Commit-Queue: Lily Chen <chlily@chromium.org> Reviewed-by:Maksim Orlovich <morlovich@chromium.org> Reviewed-by:
Balazs Engedy <engedy@chromium.org> Cr-Commit-Position: refs/heads/master@{#707179}
Showing
Please register or sign in to comment