IPP: Don't modify ProxyList for direct-only IPP proxy lists [chromium/src : main]

0 views
Skip to first unread message

Giovanni Ortuno Urquidi (Gerrit)

unread,
Sep 24, 2025, 10:20:22 AM (yesterday) Sep 24
to Giovanni Ortuno Urquidi, Andrew Williams, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, Dustin Mitchell, aakalla...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, ortuno...@chromium.org, rizvis...@google.com
Attention needed from Andrew Williams

Giovanni Ortuno Urquidi added 1 comment

Patchset-level comments
File-level comment, Patchset 7 (Latest):
Giovanni Ortuno Urquidi . resolved

awillia: PTAL!

Open in Gerrit

Related details

Attention is currently required from:
  • Andrew Williams
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
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: Ibade586a02febf1aff3525c8d1d5ebad9ea732f0
Gerrit-Change-Number: 6977425
Gerrit-PatchSet: 7
Gerrit-Owner: Giovanni Ortuno Urquidi <ort...@chromium.org>
Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
Gerrit-Reviewer: Giovanni Ortuno Urquidi <ort...@chromium.org>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-CC: Dustin Mitchell <djmi...@chromium.org>
Gerrit-Attention: Andrew Williams <awi...@chromium.org>
Gerrit-Comment-Date: Wed, 24 Sep 2025 14:20:16 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Andrew Williams (Gerrit)

unread,
Sep 24, 2025, 1:05:35 PM (yesterday) Sep 24
to Giovanni Ortuno Urquidi, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, Dustin Mitchell, aakalla...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, ortuno...@chromium.org, rizvis...@google.com
Attention needed from Giovanni Ortuno Urquidi

Andrew Williams voted and added 8 comments

Votes added by Andrew Williams

Code-Review+1

8 comments

Patchset-level comments
Andrew Williams . resolved

LGTM with some minor feedback and questions. Using the MockIpProtectionCore to enable use of the real IpProtectionProxyDelegate in these higher level tests turned out simpler than I thought it would - thanks for coming up with that!

Commit Message
Line 23, Patchset 7 (Latest):by Net.HttpJob.IpProtection.TotalTimeNotCached2
Andrew Williams . unresolved

nit:
```suggestion
by Net.HttpJob.IpProtection.TotalTimeNotCached3
```

File components/ip_protection/common/ip_protection_url_request_http_job_unittest.cc
Line 32, Patchset 7 (Latest):const char kSimpleGetMockWrite[] =
Andrew Williams . unresolved

I think these will get converted to `std::string_view`s for use by `net::MockRead`, which I'm assuming will require the length to be computed at runtime. Would it be better for these to be `constexpr std::string_view` to begin with?

Line 48, Patchset 7 (Latest): net::ProxyServer::SCHEME_HTTPS, "proxy-a.invalid", 443);
Andrew Williams . unresolved

Should we just use `proxy-a` and `proxy-b` for these? there's nothing inherently invalid about them (even though the tests inject errors for them)

Line 67, Patchset 7 (Latest): // IpProtectionCore
Andrew Williams . unresolved

should this be above IsIpProtectionEnabled, all the overrides for this grouped together, and should SetProxyList be in a separate grouping since it's not part of the interface?

Line 184, Patchset 7 (Latest): // Since we fall back to direct, after trying the proxy chain, we expect a
Andrew Williams . unresolved

optional: it might be helpful to verify that the proxy delegate did attempt to proxy the request, possibly by checking that the NetworkService.IpProtection.ProxyResolution histogram had an emission to the kAttemptProxy bucket. The check below does give us that already, but if this test does start failing in the future, looking at whether kAttemptProxy was emitted will let us know whether the mock proxy delegate might be the issue or the logic added in this CL

Line 348, Patchset 7 (Latest): }
Andrew Williams . unresolved

optional: we could get the proxy_resolution_service from context_ and use it to ensure that the IPP proxy chain has been marked as bad, since that seems to be the purpose of this. For example: https://source.chromium.org/chromium/chromium/src/+/main:services/network/network_context_unittest.cc;l=6368;drc=5b7a3b2777a0c5ec94d1635a1c7fdc13442a1e9d

Line 371, Patchset 7 (Latest):
Andrew Williams . unresolved

optional: it might be worth looking for a kAttemptProxy here too

Open in Gerrit

Related details

Attention is currently required from:
  • Giovanni Ortuno Urquidi
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    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: Ibade586a02febf1aff3525c8d1d5ebad9ea732f0
    Gerrit-Change-Number: 6977425
    Gerrit-PatchSet: 7
    Gerrit-Owner: Giovanni Ortuno Urquidi <ort...@chromium.org>
    Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
    Gerrit-Reviewer: Giovanni Ortuno Urquidi <ort...@chromium.org>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Dustin Mitchell <djmi...@chromium.org>
    Gerrit-Attention: Giovanni Ortuno Urquidi <ort...@chromium.org>
    Gerrit-Comment-Date: Wed, 24 Sep 2025 17:05:26 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Giovanni Ortuno Urquidi (Gerrit)

    unread,
    Sep 24, 2025, 2:09:33 PM (yesterday) Sep 24
    to Giovanni Ortuno Urquidi, Andrew Williams, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, Dustin Mitchell, aakalla...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, ortuno...@chromium.org, rizvis...@google.com
    Attention needed from Andrew Williams

    Giovanni Ortuno Urquidi added 7 comments

    Commit Message
    Line 23, Patchset 7:by Net.HttpJob.IpProtection.TotalTimeNotCached2
    Andrew Williams . resolved

    nit:
    ```suggestion
    by Net.HttpJob.IpProtection.TotalTimeNotCached3
    ```

    Giovanni Ortuno Urquidi

    Done

    File components/ip_protection/common/ip_protection_url_request_http_job_unittest.cc
    Line 32, Patchset 7:const char kSimpleGetMockWrite[] =
    Andrew Williams . resolved

    I think these will get converted to `std::string_view`s for use by `net::MockRead`, which I'm assuming will require the length to be computed at runtime. Would it be better for these to be `constexpr std::string_view` to begin with?

    Giovanni Ortuno Urquidi

    Done

    Line 48, Patchset 7: net::ProxyServer::SCHEME_HTTPS, "proxy-a.invalid", 443);
    Andrew Williams . resolved

    Should we just use `proxy-a` and `proxy-b` for these? there's nothing inherently invalid about them (even though the tests inject errors for them)

    Giovanni Ortuno Urquidi

    Done

    Line 67, Patchset 7: // IpProtectionCore
    Andrew Williams . resolved

    should this be above IsIpProtectionEnabled, all the overrides for this grouped together, and should SetProxyList be in a separate grouping since it's not part of the interface?

    Giovanni Ortuno Urquidi

    Ah, I skimmed too quickly and didn't realize the methods above were overrides. Fixed.

    Line 184, Patchset 7: // Since we fall back to direct, after trying the proxy chain, we expect a
    Andrew Williams . resolved

    optional: it might be helpful to verify that the proxy delegate did attempt to proxy the request, possibly by checking that the NetworkService.IpProtection.ProxyResolution histogram had an emission to the kAttemptProxy bucket. The check below does give us that already, but if this test does start failing in the future, looking at whether kAttemptProxy was emitted will let us know whether the mock proxy delegate might be the issue or the logic added in this CL

    Giovanni Ortuno Urquidi

    Done

    Line 348, Patchset 7: }
    Andrew Williams . resolved

    optional: we could get the proxy_resolution_service from context_ and use it to ensure that the IPP proxy chain has been marked as bad, since that seems to be the purpose of this. For example: https://source.chromium.org/chromium/chromium/src/+/main:services/network/network_context_unittest.cc;l=6368;drc=5b7a3b2777a0c5ec94d1635a1c7fdc13442a1e9d

    Giovanni Ortuno Urquidi

    Done

    Line 371, Patchset 7:
    Andrew Williams . resolved

    optional: it might be worth looking for a kAttemptProxy here too

    Giovanni Ortuno Urquidi

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andrew Williams
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    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: Ibade586a02febf1aff3525c8d1d5ebad9ea732f0
    Gerrit-Change-Number: 6977425
    Gerrit-PatchSet: 9
    Gerrit-Owner: Giovanni Ortuno Urquidi <ort...@chromium.org>
    Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
    Gerrit-Reviewer: Giovanni Ortuno Urquidi <ort...@chromium.org>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Dustin Mitchell <djmi...@chromium.org>
    Gerrit-Attention: Andrew Williams <awi...@chromium.org>
    Gerrit-Comment-Date: Wed, 24 Sep 2025 18:09:26 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Andrew Williams <awi...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Giovanni Ortuno Urquidi (Gerrit)

    unread,
    Sep 24, 2025, 2:12:47 PM (yesterday) Sep 24
    to Giovanni Ortuno Urquidi, David Schinazi, Nidhi Jaju, Andrew Williams, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, Dustin Mitchell, aakalla...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, ortuno...@chromium.org, rizvis...@google.com
    Attention needed from Andrew Williams, David Schinazi and Nidhi Jaju

    Giovanni Ortuno Urquidi added 1 comment

    Giovanni Ortuno Urquidi . resolved

    dschinazi: PTAL at net/
    nidhijaju: PTAL at histograms.xml

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andrew Williams
    • David Schinazi
    • Nidhi Jaju
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    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: Ibade586a02febf1aff3525c8d1d5ebad9ea732f0
    Gerrit-Change-Number: 6977425
    Gerrit-PatchSet: 9
    Gerrit-Owner: Giovanni Ortuno Urquidi <ort...@chromium.org>
    Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
    Gerrit-Reviewer: David Schinazi <dsch...@chromium.org>
    Gerrit-Reviewer: Giovanni Ortuno Urquidi <ort...@chromium.org>
    Gerrit-Reviewer: Nidhi Jaju <nidh...@chromium.org>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Dustin Mitchell <djmi...@chromium.org>
    Gerrit-Attention: Nidhi Jaju <nidh...@chromium.org>
    Gerrit-Attention: David Schinazi <dsch...@chromium.org>
    Gerrit-Attention: Andrew Williams <awi...@chromium.org>
    Gerrit-Comment-Date: Wed, 24 Sep 2025 18:12:37 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Giovanni Ortuno Urquidi (Gerrit)

    unread,
    Sep 24, 2025, 2:14:07 PM (yesterday) Sep 24
    to Giovanni Ortuno Urquidi, Nidhi Jaju, David Schinazi, Andrew Williams, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, Dustin Mitchell, aakalla...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, ortuno...@chromium.org, rizvis...@google.com
    Attention needed from Andrew Williams, David Schinazi and Nidhi Jaju

    Giovanni Ortuno Urquidi added 1 comment

    Patchset-level comments
    Giovanni Ortuno Urquidi . resolved

    actually dschinazi, mind taking a look a histograms.xml as well? Moving nidhijaju to cc.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andrew Williams
    • David Schinazi
    • Nidhi Jaju
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    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: Ibade586a02febf1aff3525c8d1d5ebad9ea732f0
    Gerrit-Change-Number: 6977425
    Gerrit-PatchSet: 9
    Gerrit-Owner: Giovanni Ortuno Urquidi <ort...@chromium.org>
    Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
    Gerrit-Reviewer: David Schinazi <dsch...@chromium.org>
    Gerrit-Reviewer: Giovanni Ortuno Urquidi <ort...@chromium.org>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Dustin Mitchell <djmi...@chromium.org>
    Gerrit-CC: Nidhi Jaju <nidh...@chromium.org>
    Gerrit-Attention: Nidhi Jaju <nidh...@chromium.org>
    Gerrit-Attention: David Schinazi <dsch...@chromium.org>
    Gerrit-Attention: Andrew Williams <awi...@chromium.org>
    Gerrit-Comment-Date: Wed, 24 Sep 2025 18:14:01 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    David Schinazi (Gerrit)

    unread,
    12:20 PM (2 hours ago) 12:20 PM
    to Giovanni Ortuno Urquidi, Nidhi Jaju, Andrew Williams, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, Dustin Mitchell, aakalla...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, ortuno...@chromium.org, rizvis...@google.com
    Attention needed from Andrew Williams and Giovanni Ortuno Urquidi

    David Schinazi voted and added 1 comment

    Votes added by David Schinazi

    Code-Review+1

    1 comment

    Patchset-level comments
    David Schinazi . resolved

    Very nice!

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andrew Williams
    • Giovanni Ortuno Urquidi
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    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: Ibade586a02febf1aff3525c8d1d5ebad9ea732f0
    Gerrit-Change-Number: 6977425
    Gerrit-PatchSet: 9
    Gerrit-Owner: Giovanni Ortuno Urquidi <ort...@chromium.org>
    Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
    Gerrit-Reviewer: David Schinazi <dsch...@chromium.org>
    Gerrit-Reviewer: Giovanni Ortuno Urquidi <ort...@chromium.org>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Dustin Mitchell <djmi...@chromium.org>
    Gerrit-CC: Nidhi Jaju <nidh...@chromium.org>
    Gerrit-Attention: Giovanni Ortuno Urquidi <ort...@chromium.org>
    Gerrit-Attention: Andrew Williams <awi...@chromium.org>
    Gerrit-Comment-Date: Thu, 25 Sep 2025 16:20:34 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Giovanni Ortuno Urquidi (Gerrit)

    unread,
    12:33 PM (2 hours ago) 12:33 PM
    to Giovanni Ortuno Urquidi, David Schinazi, Nidhi Jaju, Andrew Williams, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, Dustin Mitchell, aakalla...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, ortuno...@chromium.org, rizvis...@google.com
    Attention needed from Andrew Williams

    Giovanni Ortuno Urquidi voted and added 1 comment

    Votes added by Giovanni Ortuno Urquidi

    Commit-Queue+2

    1 comment

    Patchset-level comments
    Giovanni Ortuno Urquidi . resolved

    Related details

    Attention is currently required from:
    • Andrew Williams
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    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: Ibade586a02febf1aff3525c8d1d5ebad9ea732f0
    Gerrit-Change-Number: 6977425
    Gerrit-PatchSet: 9
    Gerrit-Owner: Giovanni Ortuno Urquidi <ort...@chromium.org>
    Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
    Gerrit-Reviewer: David Schinazi <dsch...@chromium.org>
    Gerrit-Reviewer: Giovanni Ortuno Urquidi <ort...@chromium.org>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Dustin Mitchell <djmi...@chromium.org>
    Gerrit-CC: Nidhi Jaju <nidh...@chromium.org>
    Gerrit-Attention: Andrew Williams <awi...@chromium.org>
    Gerrit-Comment-Date: Thu, 25 Sep 2025 16:33:22 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Chromium LUCI CQ (Gerrit)

    unread,
    12:38 PM (2 hours ago) 12:38 PM
    to Giovanni Ortuno Urquidi, David Schinazi, Nidhi Jaju, Andrew Williams, Chromium Metrics Reviews, chromium...@chromium.org, Dustin Mitchell, aakalla...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, ortuno...@chromium.org, rizvis...@google.com

    Chromium LUCI CQ submitted the change

    Change information

    Commit message:
    IPP: Don't modify ProxyList for direct-only IPP proxy lists

    Switches the logic in IpProtectionProxyDelegate to avoid modifying the
    ProxyList if:

    1. All IPP chains were deprioritized, or 2. IPPCore didn't return any
    chains.

    Also introduces IpProtectionUrlRequestHttpJobTest which supersede the
    tests in net/url_request/url_request_http_job_unittest.cc which used a
    TestProxyDelegate. The new tests use a real IpProtectionProxyDelegate
    which should improve the test coverage.

    OBSOLETE_HISTOGRAM[Net.HttpJob.IpProtection.Fallback.TotalTimeNotCached]=Superseded
    by Net.HttpJob.IpProtection.Fallback.TotalTimeNotCached2
    OBSOLETE_HISTOGRAM[Net.HttpJob.IpProtection.TotalTimeNotCached2]=Superseded
    by Net.HttpJob.IpProtection.TotalTimeNotCached3
    Fixed: 432063580
    Change-Id: Ibade586a02febf1aff3525c8d1d5ebad9ea732f0
    Commit-Queue: Giovanni Ortuno Urquidi <ort...@chromium.org>
    Reviewed-by: Andrew Williams <awi...@chromium.org>
    Reviewed-by: David Schinazi <dsch...@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1520683}
    Files:
    • M components/ip_protection/BUILD.gn
    • M components/ip_protection/common/BUILD.gn
    • M components/ip_protection/common/ip_protection_proxy_delegate.cc
    • M components/ip_protection/common/ip_protection_proxy_delegate_unittest.cc
    • A components/ip_protection/common/ip_protection_url_request_http_job_unittest.cc
    • M net/url_request/url_request_http_job.cc
    • M net/url_request/url_request_http_job_unittest.cc
    • M tools/metrics/histograms/metadata/net/histograms.xml
    Change size: L
    Delta: 8 files changed, 464 insertions(+), 75 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by David Schinazi, +1 by Andrew Williams
    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: Ibade586a02febf1aff3525c8d1d5ebad9ea732f0
    Gerrit-Change-Number: 6977425
    Gerrit-PatchSet: 10
    Gerrit-Owner: Giovanni Ortuno Urquidi <ort...@chromium.org>
    Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: David Schinazi <dsch...@chromium.org>
    Gerrit-Reviewer: Giovanni Ortuno Urquidi <ort...@chromium.org>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages