Added static list of pervasive resources along with an expiration time [chromium/src : main]

0 views
Skip to first unread message

Patrick Meenan (Gerrit)

unread,
Jan 21, 2026, 6:20:15 PM (9 days ago) Jan 21
to Adam Rice, Dave Tapuska, AyeAye, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, android-web...@chromium.org, asvitkine...@chromium.org, fenced-fra...@chromium.org, loading...@chromium.org, network-ser...@chromium.org
Attention needed from Adam Rice and Dave Tapuska

Patrick Meenan added 1 comment

Patchset-level comments
File-level comment, Patchset 6 (Latest):
Patrick Meenan . resolved

ricea@ could you PTAL?

dtapuska@ could you look at the file path change in content/browser/DEPS?

Thanks.

Open in Gerrit

Related details

Attention is currently required from:
  • Adam Rice
  • Dave Tapuska
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I09902a385a6c39463de433144e4277bbff1a3e48
Gerrit-Change-Number: 7504858
Gerrit-PatchSet: 6
Gerrit-Owner: Patrick Meenan <pme...@chromium.org>
Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
Gerrit-Reviewer: Dave Tapuska <dtap...@chromium.org>
Gerrit-Reviewer: Patrick Meenan <pme...@chromium.org>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-Attention: Adam Rice <ri...@chromium.org>
Gerrit-Attention: Dave Tapuska <dtap...@chromium.org>
Gerrit-Comment-Date: Wed, 21 Jan 2026 23:20:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Adam Rice (Gerrit)

unread,
Jan 22, 2026, 2:54:26 AM (9 days ago) Jan 22
to Patrick Meenan, Dave Tapuska, AyeAye, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, android-web...@chromium.org, asvitkine...@chromium.org, fenced-fra...@chromium.org, loading...@chromium.org, network-ser...@chromium.org
Attention needed from Dave Tapuska and Patrick Meenan

Adam Rice added 14 comments

File services/network/network_context.h
Line 1082, Patchset 6 (Latest): // pervasive script.
Adam Rice . unresolved

Maybe change "script" to reflect that other types are supported now?

File services/network/pervasive_resources/README.md
Line 42, Patchset 6 (Latest):The lust or URLPatterns includes an expiration date for when the list is no longer considered "fresh" and should be ignored.
Adam Rice . unresolved

```suggestion
The list of URLPatterns includes an expiration date for when the list is no longer considered "fresh" and should be ignored.
```

File services/network/pervasive_resources/shared_resource_checker.cc
Line 95, Patchset 6 (Latest): LoadPervasivePatterns(raw_patterns_, raw_patterns_expiration_);
Adam Rice . unresolved

Maybe consider lazily loading the patterns the first time a script, style or dictionary is requested? Just to defer the cost until a time when we are slightly less busy.

Line 110, Patchset 6 (Latest): std::stringstream ss(patterns);
Adam Rice . unresolved

`std::stringstream` is famously inefficient. I'd prefer to use `base::SplitString()`.

Line 115, Patchset 6 (Latest): if (pattern_as_url.is_valid()) {
Adam Rice . unresolved

Now that the patterns are built-in,
```
CHECK(pattern_as_url.is_valid());
```
would be better.

Line 118, Patchset 6 (Latest): if (pattern->is_valid()) {
Adam Rice . unresolved

```
CHECK(pattern->is_valid());
```

Line 144, Patchset 6 (Latest): if (now > patterns_expiration_) {
Adam Rice . unresolved

Maybe just check this on load? People should be restarting their browsers every week or two to get security updates anyway.

Line 148, Patchset 6 (Latest): // Only allow script, style and dictionary destinations.
Adam Rice . unresolved

If you're going to do the expiry check every time, maybe put this check before the expiry check, to avoid the overhead of looking up the current time for documents and images?

File services/network/pervasive_resources/shared_resource_checker_patterns.cc
Line 1, Patchset 6 (Latest):// Copyright 2026 The Chromium Authors
Adam Rice . unresolved

I suggest making this a header file that is only included by `shared_resource_checker.cc` instead of a `.cc` file. This has a few benefits:
1. The constants will no longer need to be member variables of SharedResourceChecker. You can just make them globals in the `network::internal` namespace.
2. You can make them `inline constexpr`, which may enable the compiler to perform additional optimisations.
3. The implementation of SharedResourceChecker will no longer be split over multiple `.cc` files.

Line 6, Patchset 6 (Latest):// https://github.com/pmeenan/pervasive
Adam Rice . unresolved

Meta-nit: Should be on a Google-owned repository in case you get hit by a bus.

Line 21, Patchset 6 (Latest):const char SharedResourceChecker::raw_patterns_[] =
Adam Rice . unresolved

(Not for this CL) Once creation of the list is automated, consider compressing it with zstd to reduce binary size. See the call to `ZSTD_decompress()` in components/variations/seed_reader_writer.cc for example.

File services/network/pervasive_resources/shared_resource_checker_unittest.cc
Line 103, Patchset 6 (Latest): if (enabled_) {
scoped_feature_list_.InitAndEnableFeature(
features::kCacheSharingForPervasiveResources);
} else {
scoped_feature_list_.InitAndDisableFeature(
features::kCacheSharingForPervasiveResources);
}
Adam Rice . unresolved
```suggestion
scoped_feature_list_.InitWithFeatureState(
features::kCacheSharingForPervasiveResources, enabled_);

```

File services/network/public/cpp/features.h
Line 333, Patchset 6 (Latest):// When enabled, fetches for "pervasive" scripts that match one of the
Adam Rice . unresolved

Maybe change this comment to reflect that additional types are covered now?

File testing/variations/fieldtrial_testing_config.json
Line 4903, Patchset 6 (Parent): "CacheSharingForPervasiveScripts": [
Adam Rice . unresolved

Shouldn't you add an entry to enable CacheSharingForPervasiveResources at the same time?

Open in Gerrit

Related details

Attention is currently required from:
  • Dave Tapuska
  • Patrick Meenan
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I09902a385a6c39463de433144e4277bbff1a3e48
    Gerrit-Change-Number: 7504858
    Gerrit-PatchSet: 6
    Gerrit-Owner: Patrick Meenan <pme...@chromium.org>
    Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
    Gerrit-Reviewer: Dave Tapuska <dtap...@chromium.org>
    Gerrit-Reviewer: Patrick Meenan <pme...@chromium.org>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-Attention: Patrick Meenan <pme...@chromium.org>
    Gerrit-Attention: Dave Tapuska <dtap...@chromium.org>
    Gerrit-Comment-Date: Thu, 22 Jan 2026 07:54:04 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Patrick Meenan (Gerrit)

    unread,
    Jan 22, 2026, 3:18:17 PM (8 days ago) Jan 22
    to Nico Weber, Adam Rice, Dave Tapuska, AyeAye, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, android-web...@chromium.org, asvitkine...@chromium.org, fenced-fra...@chromium.org, loading...@chromium.org, network-ser...@chromium.org
    Attention needed from Adam Rice, Dave Tapuska and Nico Weber

    Patrick Meenan added 15 comments

    Patchset-level comments
    File-level comment, Patchset 9 (Latest):
    Patrick Meenan . resolved

    Thanks Adam, great feedback - hopefully all addressed.

    thakis@, could you PTAL at tools/pervasive_resources? It is pulling in the script that is used to automate the generation of the URL patterns for the pervasive resources from the HTTP Archive dataset.

    File services/network/network_context.h
    Line 1082, Patchset 6: // pervasive script.
    Adam Rice . resolved

    Maybe change "script" to reflect that other types are supported now?

    Patrick Meenan

    Done

    File services/network/pervasive_resources/README.md
    Line 42, Patchset 6:The lust or URLPatterns includes an expiration date for when the list is no longer considered "fresh" and should be ignored.
    Adam Rice . resolved

    ```suggestion
    The list of URLPatterns includes an expiration date for when the list is no longer considered "fresh" and should be ignored.
    ```

    Patrick Meenan

    Done

    File services/network/pervasive_resources/shared_resource_checker.cc
    Line 95, Patchset 6: LoadPervasivePatterns(raw_patterns_, raw_patterns_expiration_);
    Adam Rice . resolved

    Maybe consider lazily loading the patterns the first time a script, style or dictionary is requested? Just to defer the cost until a time when we are slightly less busy.

    Patrick Meenan

    Done, thanks. I shuffled the checks as well so that all of the trivial checks to exclude resources will be done so it only loads on the first script, style or dictionary that doesn't use query params and only if cookies are allowed.

    Line 110, Patchset 6: std::stringstream ss(patterns);
    Adam Rice . resolved

    `std::stringstream` is famously inefficient. I'd prefer to use `base::SplitString()`.

    Patrick Meenan

    Done

    Line 115, Patchset 6: if (pattern_as_url.is_valid()) {
    Adam Rice . resolved

    Now that the patterns are built-in,
    ```
    CHECK(pattern_as_url.is_valid());
    ```
    would be better.

    Patrick Meenan

    Done

    Line 118, Patchset 6: if (pattern->is_valid()) {
    Adam Rice . resolved

    ```
    CHECK(pattern->is_valid());
    ```

    Patrick Meenan

    Done

    Line 144, Patchset 6: if (now > patterns_expiration_) {
    Adam Rice . resolved

    Maybe just check this on load? People should be restarting their browsers every week or two to get security updates anyway.

    Patrick Meenan

    Done. I originally had it that way but was worried about kiosks and similar long-running cases. That said, the list is good for a year so if they haven't updated in that long, they have other problems (and the failure mode of an out-of-date list is still safe, just slightly more risk of history sniffing being possible).

    Line 148, Patchset 6: // Only allow script, style and dictionary destinations.
    Adam Rice . resolved

    If you're going to do the expiry check every time, maybe put this check before the expiry check, to avoid the overhead of looking up the current time for documents and images?

    Patrick Meenan

    Moved the time check but I also rearranged all of the checks to make the really fast ones first.

    File services/network/pervasive_resources/shared_resource_checker_patterns.cc
    Line 1, Patchset 6:// Copyright 2026 The Chromium Authors
    Adam Rice . resolved

    I suggest making this a header file that is only included by `shared_resource_checker.cc` instead of a `.cc` file. This has a few benefits:
    1. The constants will no longer need to be member variables of SharedResourceChecker. You can just make them globals in the `network::internal` namespace.
    2. You can make them `inline constexpr`, which may enable the compiler to perform additional optimisations.
    3. The implementation of SharedResourceChecker will no longer be split over multiple `.cc` files.

    Patrick Meenan

    Done

    Meta-nit: Should be on a Google-owned repository in case you get hit by a bus.

    Patrick Meenan

    Rick and Nico recommended just adding it to the /tools directly in the Chrome codebase so I pulled it in.

    Line 21, Patchset 6:const char SharedResourceChecker::raw_patterns_[] =
    Adam Rice . resolved

    (Not for this CL) Once creation of the list is automated, consider compressing it with zstd to reduce binary size. See the call to `ZSTD_decompress()` in components/variations/seed_reader_writer.cc for example.

    Patrick Meenan

    This will be an interesting tradeoff with transparency with the list's contents (given the feature gets a fair bit of scrutiny). In that case it might work to store the plain-text version of the list in the repository next to the compressed version and make sure both are updated when it is changed.

    File services/network/pervasive_resources/shared_resource_checker_unittest.cc
    Line 103, Patchset 6: if (enabled_) {

    scoped_feature_list_.InitAndEnableFeature(
    features::kCacheSharingForPervasiveResources);
    } else {
    scoped_feature_list_.InitAndDisableFeature(
    features::kCacheSharingForPervasiveResources);
    }
    Adam Rice . resolved
    ```suggestion
    scoped_feature_list_.InitWithFeatureState(
    features::kCacheSharingForPervasiveResources, enabled_);

    ```

    Patrick Meenan

    Done

    File services/network/public/cpp/features.h
    Line 333, Patchset 6:// When enabled, fetches for "pervasive" scripts that match one of the
    Adam Rice . resolved

    Maybe change this comment to reflect that additional types are covered now?

    Patrick Meenan

    Done

    File testing/variations/fieldtrial_testing_config.json
    Line 4903, Patchset 6 (Parent): "CacheSharingForPervasiveScripts": [
    Adam Rice . resolved

    Shouldn't you add an entry to enable CacheSharingForPervasiveResources at the same time?

    Patrick Meenan

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Adam Rice
    • Dave Tapuska
    • Nico Weber
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I09902a385a6c39463de433144e4277bbff1a3e48
      Gerrit-Change-Number: 7504858
      Gerrit-PatchSet: 9
      Gerrit-Owner: Patrick Meenan <pme...@chromium.org>
      Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
      Gerrit-Reviewer: Dave Tapuska <dtap...@chromium.org>
      Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
      Gerrit-Reviewer: Patrick Meenan <pme...@chromium.org>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-Attention: Nico Weber <tha...@chromium.org>
      Gerrit-Attention: Adam Rice <ri...@chromium.org>
      Gerrit-Attention: Dave Tapuska <dtap...@chromium.org>
      Gerrit-Comment-Date: Thu, 22 Jan 2026 20:18:11 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Adam Rice <ri...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Nico Weber (Gerrit)

      unread,
      Jan 22, 2026, 3:21:20 PM (8 days ago) Jan 22
      to Patrick Meenan, Nico Weber, Adam Rice, Dave Tapuska, AyeAye, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, android-web...@chromium.org, asvitkine...@chromium.org, fenced-fra...@chromium.org, loading...@chromium.org, network-ser...@chromium.org
      Attention needed from Adam Rice, Dave Tapuska and Patrick Meenan

      Nico Weber voted and added 1 comment

      Votes added by Nico Weber

      Code-Review+1

      1 comment

      Patchset-level comments
      Nico Weber . resolved

      tools/ lg!

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Adam Rice
      • Dave Tapuska
      • Patrick Meenan
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I09902a385a6c39463de433144e4277bbff1a3e48
        Gerrit-Change-Number: 7504858
        Gerrit-PatchSet: 9
        Gerrit-Owner: Patrick Meenan <pme...@chromium.org>
        Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
        Gerrit-Reviewer: Dave Tapuska <dtap...@chromium.org>
        Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
        Gerrit-Reviewer: Patrick Meenan <pme...@chromium.org>
        Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
        Gerrit-Attention: Patrick Meenan <pme...@chromium.org>
        Gerrit-Attention: Adam Rice <ri...@chromium.org>
        Gerrit-Attention: Dave Tapuska <dtap...@chromium.org>
        Gerrit-Comment-Date: Thu, 22 Jan 2026 20:21:12 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Dave Tapuska (Gerrit)

        unread,
        Jan 22, 2026, 3:34:07 PM (8 days ago) Jan 22
        to Patrick Meenan, Nico Weber, Adam Rice, AyeAye, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, android-web...@chromium.org, asvitkine...@chromium.org, fenced-fra...@chromium.org, loading...@chromium.org, network-ser...@chromium.org
        Attention needed from Adam Rice and Patrick Meenan

        Dave Tapuska voted Code-Review+1

        Code-Review+1
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Adam Rice
        • Patrick Meenan
        Gerrit-Comment-Date: Thu, 22 Jan 2026 20:34:01 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Adam Rice (Gerrit)

        unread,
        Jan 23, 2026, 7:08:41 AM (8 days ago) Jan 23
        to Patrick Meenan, Dave Tapuska, Nico Weber, AyeAye, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, android-web...@chromium.org, asvitkine...@chromium.org, fenced-fra...@chromium.org, loading...@chromium.org, network-ser...@chromium.org
        Attention needed from Patrick Meenan

        Adam Rice voted and added 2 comments

        Votes added by Adam Rice

        Code-Review+1

        2 comments

        Patchset-level comments
        Adam Rice . resolved

        lgtm, but I haven't actually reviewed the Python yet. I might not get to that until Monday. If you want to get this landed before then to avoid more rebase pain that is fine. I'm happy to review the Python after-the-fact since it is not in the critical path.

        File services/network/pervasive_resources/shared_resource_checker_patterns.cc
        Line 21, Patchset 6:const char SharedResourceChecker::raw_patterns_[] =
        Adam Rice . resolved

        (Not for this CL) Once creation of the list is automated, consider compressing it with zstd to reduce binary size. See the call to `ZSTD_decompress()` in components/variations/seed_reader_writer.cc for example.

        Patrick Meenan

        This will be an interesting tradeoff with transparency with the list's contents (given the feature gets a fair bit of scrutiny). In that case it might work to store the plain-text version of the list in the repository next to the compressed version and make sure both are updated when it is changed.

        Adam Rice

        Ah, that is true. You could literally put the uncompressed list in a comment in this file.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Patrick Meenan
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I09902a385a6c39463de433144e4277bbff1a3e48
        Gerrit-Change-Number: 7504858
        Gerrit-PatchSet: 9
        Gerrit-Owner: Patrick Meenan <pme...@chromium.org>
        Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
        Gerrit-Reviewer: Dave Tapuska <dtap...@chromium.org>
        Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
        Gerrit-Reviewer: Patrick Meenan <pme...@chromium.org>
        Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
        Gerrit-Attention: Patrick Meenan <pme...@chromium.org>
        Gerrit-Comment-Date: Fri, 23 Jan 2026 12:08:03 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        Comment-In-Reply-To: Patrick Meenan <pme...@chromium.org>
        Comment-In-Reply-To: Adam Rice <ri...@chromium.org>
        satisfied_requirement
        open
        diffy

        Patrick Meenan (Gerrit)

        unread,
        Jan 23, 2026, 10:24:37 AM (8 days ago) Jan 23
        to Adam Rice, Dave Tapuska, Nico Weber, AyeAye, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, android-web...@chromium.org, asvitkine...@chromium.org, fenced-fra...@chromium.org, loading...@chromium.org, network-ser...@chromium.org

        Patrick Meenan added 1 comment

        Patchset-level comments
        Adam Rice . resolved

        lgtm, but I haven't actually reviewed the Python yet. I might not get to that until Monday. If you want to get this landed before then to avoid more rebase pain that is fine. I'm happy to review the Python after-the-fact since it is not in the critical path.

        Patrick Meenan

        No rush. Rebase is trivial (most of the changes are in dedicated files and those that aren't are in parts of files that don't change frequently).

        I'll add the support for zstd-compressing the patterns so we have everything already done (and I don't expect it will be difficult - famous last words).

        Feel free to start looking at the python logic or wait until I let you know that the zstd compression has been integrated - either works since the core logic won't be changing.

        Open in Gerrit

        Related details

        Attention set is empty
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I09902a385a6c39463de433144e4277bbff1a3e48
        Gerrit-Change-Number: 7504858
        Gerrit-PatchSet: 9
        Gerrit-Owner: Patrick Meenan <pme...@chromium.org>
        Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
        Gerrit-Reviewer: Dave Tapuska <dtap...@chromium.org>
        Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
        Gerrit-Reviewer: Patrick Meenan <pme...@chromium.org>
        Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
        Gerrit-Comment-Date: Fri, 23 Jan 2026 15:24:29 +0000
        satisfied_requirement
        open
        diffy

        Patrick Meenan (Gerrit)

        unread,
        Jan 26, 2026, 2:07:49 PM (4 days ago) Jan 26
        to Adam Rice, Dave Tapuska, Nico Weber, AyeAye, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, android-web...@chromium.org, asvitkine...@chromium.org, fenced-fra...@chromium.org, loading...@chromium.org, network-ser...@chromium.org
        Attention needed from Adam Rice

        Patrick Meenan added 2 comments

        Patchset-level comments
        File-level comment, Patchset 11 (Latest):
        Patrick Meenan . resolved

        I took a run at zstd-compressing the strings but it blew out the binary size on Fuchsia and saved ~11k on Android APK size.

        I could do platform-specific implementations and carve-out Fuchsia but I'm not sure the added complexity is worth the size difference on Android.

        File services/network/pervasive_resources/shared_resource_checker_patterns.cc
        Line 21, Patchset 6:const char SharedResourceChecker::raw_patterns_[] =
        Adam Rice . unresolved

        (Not for this CL) Once creation of the list is automated, consider compressing it with zstd to reduce binary size. See the call to `ZSTD_decompress()` in components/variations/seed_reader_writer.cc for example.

        Patrick Meenan

        This will be an interesting tradeoff with transparency with the list's contents (given the feature gets a fair bit of scrutiny). In that case it might work to store the plain-text version of the list in the repository next to the compressed version and make sure both are updated when it is changed.

        Adam Rice

        Ah, that is true. You could literally put the uncompressed list in a comment in this file.

        Patrick Meenan

        It looks like the network service didn't bundle zstd before and adding it increases the fuchsia binary size by 64kb (28kb uncompressed) and reduces the Android APK size change from 13k to 2k (saved about 11k).

        At this point, I think the best path is to pull in the strings uncompressed and then at some future point to look at compressing a lot of strings (including these) when the aggregate savings is more than the size of zstd.

        I could use raw strings on Fuchsia and compressed elsewhere (or disable the feature entirely on Fuchsia) but I'm not sure the added complexity is worth the 11k difference on Android.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Adam Rice
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I09902a385a6c39463de433144e4277bbff1a3e48
          Gerrit-Change-Number: 7504858
          Gerrit-PatchSet: 11
          Gerrit-Owner: Patrick Meenan <pme...@chromium.org>
          Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
          Gerrit-Reviewer: Dave Tapuska <dtap...@chromium.org>
          Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
          Gerrit-Reviewer: Patrick Meenan <pme...@chromium.org>
          Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
          Gerrit-Attention: Adam Rice <ri...@chromium.org>
          Gerrit-Comment-Date: Mon, 26 Jan 2026 19:07:44 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Adam Rice <ri...@chromium.org>
          Comment-In-Reply-To: Patrick Meenan <pme...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Patrick Meenan (Gerrit)

          unread,
          Jan 28, 2026, 10:30:09 AM (3 days ago) Jan 28
          to Adam Rice, Dave Tapuska, Nico Weber, AyeAye, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, android-web...@chromium.org, asvitkine...@chromium.org, fenced-fra...@chromium.org, loading...@chromium.org, network-ser...@chromium.org
          Attention needed from Patrick Meenan

          Patrick Meenan added 2 comments

          Patchset-level comments
          File-level comment, Patchset 12 (Latest):
          Patrick Meenan . resolved

          Going ahead with the as-reviewed code and will follow-up with a CL for zstd-compressing the list (and working through platform-specific size/library issues) and any follow-up for the python utility.

          File services/network/pervasive_resources/shared_resource_checker_patterns.cc
          Line 21, Patchset 6:const char SharedResourceChecker::raw_patterns_[] =
          Adam Rice . resolved

          (Not for this CL) Once creation of the list is automated, consider compressing it with zstd to reduce binary size. See the call to `ZSTD_decompress()` in components/variations/seed_reader_writer.cc for example.

          Patrick Meenan

          This will be an interesting tradeoff with transparency with the list's contents (given the feature gets a fair bit of scrutiny). In that case it might work to store the plain-text version of the list in the repository next to the compressed version and make sure both are updated when it is changed.

          Adam Rice

          Ah, that is true. You could literally put the uncompressed list in a comment in this file.

          Patrick Meenan

          It looks like the network service didn't bundle zstd before and adding it increases the fuchsia binary size by 64kb (28kb uncompressed) and reduces the Android APK size change from 13k to 2k (saved about 11k).

          At this point, I think the best path is to pull in the strings uncompressed and then at some future point to look at compressing a lot of strings (including these) when the aggregate savings is more than the size of zstd.

          I could use raw strings on Fuchsia and compressed elsewhere (or disable the feature entirely on Fuchsia) but I'm not sure the added complexity is worth the 11k difference on Android.

          Patrick Meenan

          Going with your original suggestion of separating the zstd-compression of the list into a separate CL.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Patrick Meenan
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement satisfiedCode-Owners
            • requirement is not satisfiedCode-Review
            • requirement is not satisfiedReview-Enforcement
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: I09902a385a6c39463de433144e4277bbff1a3e48
            Gerrit-Change-Number: 7504858
            Gerrit-PatchSet: 12
            Gerrit-Owner: Patrick Meenan <pme...@chromium.org>
            Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
            Gerrit-Reviewer: Dave Tapuska <dtap...@chromium.org>
            Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
            Gerrit-Reviewer: Patrick Meenan <pme...@chromium.org>
            Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
            Gerrit-Attention: Patrick Meenan <pme...@chromium.org>
            Gerrit-Comment-Date: Wed, 28 Jan 2026 15:30:03 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Patrick Meenan (Gerrit)

            unread,
            Jan 28, 2026, 10:46:43 AM (3 days ago) Jan 28
            to Adam Rice, Dave Tapuska, Nico Weber, AyeAye, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, android-web...@chromium.org, asvitkine...@chromium.org, fenced-fra...@chromium.org, loading...@chromium.org, network-ser...@chromium.org
            Attention needed from Adam Rice

            Patrick Meenan added 1 comment

            Patchset-level comments
            Patrick Meenan . resolved

            Adam, could you re-stamp the review bit on this? It's the same code as before the zstd-compressing experiment (patchset 9) but the experiment (patch set 10) introduced a new deps file for zstd that looks like it reset the code review votes (but not owners votes - bizarre) even though it was removed in patch set 11.

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Adam Rice
            Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement satisfiedCode-Owners
            • requirement is not satisfiedCode-Review
            • requirement is not satisfiedReview-Enforcement
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: I09902a385a6c39463de433144e4277bbff1a3e48
            Gerrit-Change-Number: 7504858
            Gerrit-PatchSet: 12
            Gerrit-Owner: Patrick Meenan <pme...@chromium.org>
            Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
            Gerrit-Reviewer: Dave Tapuska <dtap...@chromium.org>
            Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
            Gerrit-Reviewer: Patrick Meenan <pme...@chromium.org>
            Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
            Gerrit-Attention: Adam Rice <ri...@chromium.org>
            Gerrit-Comment-Date: Wed, 28 Jan 2026 15:46:36 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Patrick Meenan (Gerrit)

            unread,
            Jan 28, 2026, 3:03:41 PM (2 days ago) Jan 28
            to Adam Rice, Dave Tapuska, Nico Weber, AyeAye, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, android-web...@chromium.org, asvitkine...@chromium.org, fenced-fra...@chromium.org, loading...@chromium.org, network-ser...@chromium.org
            Attention needed from Adam Rice

            Patrick Meenan voted and added 1 comment

            Votes added by Patrick Meenan

            Commit-Queue+1

            1 comment

            Patchset-level comments
            File-level comment, Patchset 14 (Latest):
            Patrick Meenan . resolved

            Sorry for the spam - hopefully this is it.

            Adam, could you PTAL?

            This adds the zstd compression of the pervasive patterns back in and disables the feature for Fuchsia (where the web_engine doesn't partition anyway). The net result is a smaller size increase on Android (2k), no increase to the Fuchsia size and no need to revisit later.

            The pervasive.py script automatically generates the header with both the uncompressed and compressed versions of the list.

            The uncompressed version of the list is in line comments because the patterns include */ in them and it was cleaner to prefix each line than to escape the pattern strings in a block comment.

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Adam Rice
            Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement is not satisfiedCode-Owners
            • requirement is not satisfiedCode-Review
            • requirement is not satisfiedReview-Enforcement
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: I09902a385a6c39463de433144e4277bbff1a3e48
            Gerrit-Change-Number: 7504858
            Gerrit-PatchSet: 14
            Gerrit-Owner: Patrick Meenan <pme...@chromium.org>
            Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
            Gerrit-Reviewer: Dave Tapuska <dtap...@chromium.org>
            Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
            Gerrit-Reviewer: Patrick Meenan <pme...@chromium.org>
            Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
            Gerrit-Attention: Adam Rice <ri...@chromium.org>
            Gerrit-Comment-Date: Wed, 28 Jan 2026 20:03:35 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Zijie He (Gerrit)

            unread,
            Jan 29, 2026, 4:50:38 PM (2 days ago) Jan 29
            to Patrick Meenan, Adam Rice, Dave Tapuska, Nico Weber, AyeAye, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, android-web...@chromium.org, asvitkine...@chromium.org, fenced-fra...@chromium.org, loading...@chromium.org, network-ser...@chromium.org
            Attention needed from Adam Rice and Patrick Meenan

            Zijie He voted and added 1 comment

            Votes added by Zijie He

            Code-Review+1

            1 comment

            Patchset-level comments
            Zijie He . resolved

            Thank you Patrick to reach out.

            64KB increment of fuchsia binary size is acceptable. You may use

            ```
            Fuchsia-Binary-Size: An explanation
            ```

            to bypass the fuchsia-binary-size error if excluding the feature from fuchsia would introduce a fuchsia-specific workflow / build rule, i.e. https://chromium.googlesource.com/chromium/src/+/HEAD/docs/speed/binary_size/fuchsia_binary_size_trybot.md

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Adam Rice
            • Patrick Meenan
            Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement is not satisfiedCode-Owners
              • requirement satisfiedCode-Review
              • requirement satisfiedReview-Enforcement
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: comment
              Gerrit-Project: chromium/src
              Gerrit-Branch: main
              Gerrit-Change-Id: I09902a385a6c39463de433144e4277bbff1a3e48
              Gerrit-Change-Number: 7504858
              Gerrit-PatchSet: 14
              Gerrit-Owner: Patrick Meenan <pme...@chromium.org>
              Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
              Gerrit-Reviewer: Dave Tapuska <dtap...@chromium.org>
              Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
              Gerrit-Reviewer: Patrick Meenan <pme...@chromium.org>
              Gerrit-Reviewer: Zijie He <zij...@google.com>
              Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
              Gerrit-Attention: Patrick Meenan <pme...@chromium.org>
              Gerrit-Attention: Adam Rice <ri...@chromium.org>
              Gerrit-Comment-Date: Thu, 29 Jan 2026 21:50:25 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Adam Rice (Gerrit)

              unread,
              Jan 29, 2026, 8:26:45 PM (2 days ago) Jan 29
              to Patrick Meenan, Zijie He, Dave Tapuska, Nico Weber, AyeAye, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, android-web...@chromium.org, asvitkine...@chromium.org, fenced-fra...@chromium.org, loading...@chromium.org, network-ser...@chromium.org
              Attention needed from Patrick Meenan

              Adam Rice voted and added 1 comment

              Votes added by Adam Rice

              Code-Review+1

              1 comment

              Patchset-level comments
              Adam Rice . resolved

              lgtm, sorry for the delay

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Patrick Meenan
              Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement satisfiedCode-Owners
              • requirement satisfiedCode-Review
              • requirement satisfiedReview-Enforcement
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: comment
              Gerrit-Project: chromium/src
              Gerrit-Branch: main
              Gerrit-Change-Id: I09902a385a6c39463de433144e4277bbff1a3e48
              Gerrit-Change-Number: 7504858
              Gerrit-PatchSet: 14
              Gerrit-Owner: Patrick Meenan <pme...@chromium.org>
              Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
              Gerrit-Reviewer: Dave Tapuska <dtap...@chromium.org>
              Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
              Gerrit-Reviewer: Patrick Meenan <pme...@chromium.org>
              Gerrit-Reviewer: Zijie He <zij...@google.com>
              Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
              Gerrit-Attention: Patrick Meenan <pme...@chromium.org>
              Gerrit-Comment-Date: Fri, 30 Jan 2026 01:26:14 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              open
              diffy

              Patrick Meenan (Gerrit)

              unread,
              Jan 29, 2026, 9:09:01 PM (2 days ago) Jan 29
              to Adam Rice, Zijie He, Dave Tapuska, Nico Weber, AyeAye, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, android-web...@chromium.org, asvitkine...@chromium.org, fenced-fra...@chromium.org, loading...@chromium.org, network-ser...@chromium.org

              Patrick Meenan voted Commit-Queue+2

              Commit-Queue+2
              Open in Gerrit

              Related details

              Attention set is empty
              Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement satisfiedCode-Owners
              • requirement satisfiedCode-Review
              • requirement satisfiedReview-Enforcement
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: comment
              Gerrit-Project: chromium/src
              Gerrit-Branch: main
              Gerrit-Change-Id: I09902a385a6c39463de433144e4277bbff1a3e48
              Gerrit-Change-Number: 7504858
              Gerrit-PatchSet: 14
              Gerrit-Owner: Patrick Meenan <pme...@chromium.org>
              Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
              Gerrit-Reviewer: Dave Tapuska <dtap...@chromium.org>
              Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
              Gerrit-Reviewer: Patrick Meenan <pme...@chromium.org>
              Gerrit-Reviewer: Zijie He <zij...@google.com>
              Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
              Gerrit-Comment-Date: Fri, 30 Jan 2026 02:08:55 +0000
              Gerrit-HasComments: No
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              open
              diffy

              Chromium LUCI CQ (Gerrit)

              unread,
              Jan 29, 2026, 9:57:57 PM (2 days ago) Jan 29
              to Patrick Meenan, Adam Rice, Zijie He, Dave Tapuska, Nico Weber, AyeAye, Chromium Metrics Reviews, chromium...@chromium.org, android-web...@chromium.org, asvitkine...@chromium.org, fenced-fra...@chromium.org, loading...@chromium.org, network-ser...@chromium.org

              Chromium LUCI CQ submitted the change

              Change information

              Commit message:
              Added static list of pervasive resources along with an expiration time

              The core change in this CL was to add the actual list of URLPatterns
              for the matching of pervasive resources. The list itself is in a
              stand-alone file that can be automatically generated
              (shared_resource_checker_patterns.cc).

              Other changes that go along with the adding of the list:
              - The files were moved into a pervasive_resources folder.
              - A README.md with details on the feature and list generation was added.
              - Support for the pattern list to expire.
              - The feature name was changed to CacheSharingForPervasiveResources.
              - A test was added for testing list expiration.
              - Style and Dictionary destinations were enabled (in addition to the existing Script destination)

              Most of the changes in the CL are from moving the files.

              DISABLE_SPELLCHECKER
              Bypass-Check-License: Moved existing files with original copyright years.
              Bug: 404196743
              Change-Id: I09902a385a6c39463de433144e4277bbff1a3e48
              Reviewed-by: Adam Rice <ri...@chromium.org>
              Reviewed-by: Zijie He <zij...@google.com>
              Commit-Queue: Patrick Meenan <pme...@chromium.org>
              Cr-Commit-Position: refs/heads/main@{#1576999}
              Files:
              • M android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java
              • M content/browser/DEPS
              • M content/browser/loader/navigation_url_loader_impl_unittest.cc
              • M services/network/BUILD.gn
              • M services/network/network_context.cc
              • M services/network/network_context.h
              • A services/network/pervasive_resources/DEPS
              • A services/network/pervasive_resources/OWNERS
              • A services/network/pervasive_resources/README.md
              • A services/network/pervasive_resources/shared_resource_checker.cc
              • R services/network/pervasive_resources/shared_resource_checker.h
              • A services/network/pervasive_resources/shared_resource_checker_patterns.h
              • R services/network/pervasive_resources/shared_resource_checker_unittest.cc
              • M services/network/public/cpp/features.cc
              • M services/network/public/cpp/features.h
              • D services/network/shared_resource_checker.cc
              • M services/network/url_loader.cc
              • M services/network/url_loader_unittest.cc
              • M services/network/url_loader_util.cc
              • M testing/variations/fieldtrial_testing_config.json
              • A tools/pervasive_resources/OWNERS
              • A tools/pervasive_resources/README.md
              • A tools/pervasive_resources/pervasive.py
              • A tools/pervasive_resources/shared_resource_checker_patterns.template
              Change size: XL
              Delta: 24 files changed, 1584 insertions(+), 225 deletions(-)
              Branch: refs/heads/main
              Submit Requirements:
              • requirement satisfiedCode-Review: +1 by Zijie He, +1 by Adam Rice
              Open in Gerrit
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: merged
              Gerrit-Project: chromium/src
              Gerrit-Branch: main
              Gerrit-Change-Id: I09902a385a6c39463de433144e4277bbff1a3e48
              Gerrit-Change-Number: 7504858
              Gerrit-PatchSet: 15
              Gerrit-Owner: Patrick Meenan <pme...@chromium.org>
              Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
              Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
              Gerrit-Reviewer: Dave Tapuska <dtap...@chromium.org>
              Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
              Gerrit-Reviewer: Patrick Meenan <pme...@chromium.org>
              Gerrit-Reviewer: Zijie He <zij...@google.com>
              open
              diffy
              satisfied_requirement
              Reply all
              Reply to author
              Forward
              0 new messages