Plumb orphaned tokens through network context creation [chromium/src : main]

0 views
Skip to first unread message

Jon Toohill (Gerrit)

unread,
Aug 28, 2025, 7:45:06 PM (11 days ago) Aug 28
to Andrew Williams, Dustin Mitchell, AyeAye, net-r...@chromium.org, network-ser...@chromium.org, ortuno...@chromium.org, aakalla...@chromium.org, fenced-fra...@chromium.org, rizvis...@google.com
Attention needed from Andrew Williams

Jon Toohill voted

Auto-Submit+1
Commit-Queue+1
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: I6a6a696493334f47d6b3acd4da88fcc21762069d
Gerrit-Change-Number: 6897199
Gerrit-PatchSet: 1
Gerrit-Owner: Jon Toohill <jtoo...@google.com>
Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
Gerrit-Reviewer: Jon Toohill <jtoo...@google.com>
Gerrit-CC: Dustin Mitchell <djmi...@chromium.org>
Gerrit-Attention: Andrew Williams <awi...@chromium.org>
Gerrit-Comment-Date: Thu, 28 Aug 2025 23:44:56 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Andrew Williams (Gerrit)

unread,
Aug 29, 2025, 11:54:32 AM (10 days ago) Aug 29
to Jon Toohill, Chromium LUCI CQ, Dustin Mitchell, AyeAye, net-r...@chromium.org, network-ser...@chromium.org, ortuno...@chromium.org, aakalla...@chromium.org, fenced-fra...@chromium.org, rizvis...@google.com
Attention needed from Jon Toohill

Andrew Williams voted and added 4 comments

Votes added by Andrew Williams

Code-Review+1

4 comments

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Andrew Williams . resolved

LGTM! I had thought we would just send the prior tokens along with the first GetAuthTokens requests (per layer), but this makes the tokens available even sooner :) Leaving some questions about the MaybeRefill logic changes because that code is challenging to think through and every time it changes I'm afraid we'll introduce some cases that leads to tokens not fetching anymore.

File components/ip_protection/common/ip_protection_core_impl_mojo.cc
Line 86, Patchset 1 (Latest): ? MakeTokenManagerMap(this, core_host_remote, initial_tokens)
Andrew Williams . unresolved

nit: can std::move(initial_tokens)

File components/ip_protection/common/ip_protection_token_manager_impl.cc
Line 174, Patchset 1 (Parent): if (NeedsRefill(current_geo_id_) && !fetching_auth_tokens_) {
Andrew Williams . unresolved

do we still need to incorporate the `!fetching_auth_tokens_` check somewhere?

Line 237, Patchset 1 (Latest): next_maybe_refill_cache_.Stop();
Andrew Williams . unresolved

should we add a test for this to ensure we start back again?

Open in Gerrit

Related details

Attention is currently required from:
  • Jon Toohill
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not 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: I6a6a696493334f47d6b3acd4da88fcc21762069d
    Gerrit-Change-Number: 6897199
    Gerrit-PatchSet: 1
    Gerrit-Owner: Jon Toohill <jtoo...@google.com>
    Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
    Gerrit-Reviewer: Jon Toohill <jtoo...@google.com>
    Gerrit-CC: Dustin Mitchell <djmi...@chromium.org>
    Gerrit-Attention: Jon Toohill <jtoo...@google.com>
    Gerrit-Comment-Date: Fri, 29 Aug 2025 15:54:23 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Jon Toohill (Gerrit)

    unread,
    Sep 2, 2025, 10:06:14 AM (6 days ago) Sep 2
    to Andrew Williams, Chromium LUCI CQ, Dustin Mitchell, AyeAye, net-r...@chromium.org, network-ser...@chromium.org, ortuno...@chromium.org, aakalla...@chromium.org, fenced-fra...@chromium.org, rizvis...@google.com
    Attention needed from Andrew Williams

    Jon Toohill voted and added 3 comments

    Votes added by Jon Toohill

    Auto-Submit+1
    Commit-Queue+1

    3 comments

    File components/ip_protection/common/ip_protection_core_impl_mojo.cc
    Line 86, Patchset 1: ? MakeTokenManagerMap(this, core_host_remote, initial_tokens)
    Andrew Williams . resolved

    nit: can std::move(initial_tokens)

    Jon Toohill

    Done, and updated MakeTokenManagerMap to take a value rather than a reference.

    File components/ip_protection/common/ip_protection_token_manager_impl.cc
    Line 174, Patchset 1 (Parent): if (NeedsRefill(current_geo_id_) && !fetching_auth_tokens_) {
    Andrew Williams . resolved

    do we still need to incorporate the `!fetching_auth_tokens_` check somewhere?

    Jon Toohill

    No, `MaybeRefillCache()` does that already.

    Line 237, Patchset 1: next_maybe_refill_cache_.Stop();
    Andrew Williams . resolved

    should we add a test for this to ensure we start back again?

    Jon Toohill

    Done

    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: I6a6a696493334f47d6b3acd4da88fcc21762069d
    Gerrit-Change-Number: 6897199
    Gerrit-PatchSet: 2
    Gerrit-Owner: Jon Toohill <jtoo...@google.com>
    Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
    Gerrit-Reviewer: Jon Toohill <jtoo...@google.com>
    Gerrit-CC: Dustin Mitchell <djmi...@chromium.org>
    Gerrit-Attention: Andrew Williams <awi...@chromium.org>
    Gerrit-Comment-Date: Tue, 02 Sep 2025 14:06:03 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Andrew Williams <awi...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Giovanni Ortuno Urquidi (Gerrit)

    unread,
    Sep 2, 2025, 2:09:14 PM (6 days ago) Sep 2
    to Jon Toohill, Giovanni Ortuno Urquidi, Andrew Williams, Chromium LUCI CQ, Dustin Mitchell, AyeAye, net-r...@chromium.org, network-ser...@chromium.org, ortuno...@chromium.org, aakalla...@chromium.org, fenced-fra...@chromium.org, rizvis...@google.com
    Attention needed from Jon Toohill

    Giovanni Ortuno Urquidi added 2 comments

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

    drive-by

    File services/network/public/mojom/network_context.mojom
    Line 467, Patchset 4 (Latest): array<ip_protection.mojom.BlindSignedAuthToken>>?
    Giovanni Ortuno Urquidi . unresolved

    I wonder if we should make it non-optional? Is the distinction between an empty map and a null map useful? We could avoid a couple of if statements otherwise.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Jon Toohill
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not 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: I6a6a696493334f47d6b3acd4da88fcc21762069d
      Gerrit-Change-Number: 6897199
      Gerrit-PatchSet: 4
      Gerrit-Owner: Jon Toohill <jtoo...@google.com>
      Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
      Gerrit-Reviewer: Jon Toohill <jtoo...@google.com>
      Gerrit-CC: Dustin Mitchell <djmi...@chromium.org>
      Gerrit-CC: Giovanni Ortuno Urquidi <ort...@chromium.org>
      Gerrit-Attention: Jon Toohill <jtoo...@google.com>
      Gerrit-Comment-Date: Tue, 02 Sep 2025 18:09:08 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Jon Toohill (Gerrit)

      unread,
      Sep 2, 2025, 3:43:38 PM (6 days ago) Sep 2
      to Giovanni Ortuno Urquidi, Andrew Williams, Chromium LUCI CQ, Dustin Mitchell, AyeAye, net-r...@chromium.org, network-ser...@chromium.org, ortuno...@chromium.org, aakalla...@chromium.org, fenced-fra...@chromium.org, rizvis...@google.com
      Attention needed from Andrew Williams and Giovanni Ortuno Urquidi

      Jon Toohill voted and added 1 comment

      Votes added by Jon Toohill

      Auto-Submit+1

      1 comment

      File services/network/public/mojom/network_context.mojom
      Line 467, Patchset 4: array<ip_protection.mojom.BlindSignedAuthToken>>?
      Giovanni Ortuno Urquidi . resolved

      I wonder if we should make it non-optional? Is the distinction between an empty map and a null map useful? We could avoid a couple of if statements otherwise.

      Jon Toohill

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Andrew Williams
      • Giovanni Ortuno Urquidi
      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: I6a6a696493334f47d6b3acd4da88fcc21762069d
      Gerrit-Change-Number: 6897199
      Gerrit-PatchSet: 5
      Gerrit-Owner: Jon Toohill <jtoo...@google.com>
      Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
      Gerrit-Reviewer: Jon Toohill <jtoo...@google.com>
      Gerrit-CC: Dustin Mitchell <djmi...@chromium.org>
      Gerrit-CC: Giovanni Ortuno Urquidi <ort...@chromium.org>
      Gerrit-Attention: Andrew Williams <awi...@chromium.org>
      Gerrit-Attention: Giovanni Ortuno Urquidi <ort...@chromium.org>
      Gerrit-Comment-Date: Tue, 02 Sep 2025 19:43:28 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Giovanni Ortuno Urquidi <ort...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Giovanni Ortuno Urquidi (Gerrit)

      unread,
      Sep 2, 2025, 4:28:58 PM (6 days ago) Sep 2
      to Jon Toohill, Giovanni Ortuno Urquidi, Andrew Williams, Chromium LUCI CQ, Dustin Mitchell, AyeAye, net-r...@chromium.org, network-ser...@chromium.org, ortuno...@chromium.org, aakalla...@chromium.org, fenced-fra...@chromium.org, rizvis...@google.com
      Attention needed from Andrew Williams and Jon Toohill

      Giovanni Ortuno Urquidi added 9 comments

      Giovanni Ortuno Urquidi . resolved

      sorry for the drive-by review. I'm trying to learn more about this code and reviewing code is great for this.

      File chrome/browser/net/profile_network_context_service.cc
      Line 1578, Patchset 5 (Latest): if (profile_->IsIncognitoProfile()) {
      network_context_params->initial_ip_protection_tokens =
      ipp_core_host->TakeRecycledTokens();
      }
      Giovanni Ortuno Urquidi . unresolved

      Just double checking here. I'm a bit confused. Above we are retrieving IPPCoreHost for the current profile which in this case is the incognito profile. But wouldn't the retrieved IPPCoreHost be brand new (and thus have no tokens) if the incognito window was closed before?

      Would it be possible to add a browser test?

      File components/ip_protection/common/ip_protection_core_impl_mojo.cc
      Line 46, Patchset 5 (Latest): std::optional<IpProtectionCoreImpl::InitialTokensMap> initial_tokens) {
      Giovanni Ortuno Urquidi . unresolved

      no longer optional?

      File components/ip_protection/common/ip_protection_token_manager_impl.cc
      Line 69, Patchset 5 (Latest): if (!initial_tokens.empty()) {
      Giovanni Ortuno Urquidi . unresolved

      nit: Move this to ProcessInitialTokens(). I think it would be good to encapsulate all the logic to process tokens (including skipping it if it's empty).

      File components/ip_protection/common/ip_protection_token_manager_impl_unittest.cc
      Line 264, Patchset 5 (Latest): /*initial_tokens=*/std::vector<BlindSignedAuthToken>{},
      Giovanni Ortuno Urquidi . unresolved
      nit: Use a regular constructor unless it's not possible[[1]](https://chromium.googlesource.com/chromium/src/+/lkgr/styleguide/c++/c++-dos-and-donts.md#variable-initialization). Or we could do:
      ```suggestion
      /*initial_tokens=*/{},
      ```
      Giovanni Ortuno Urquidi . unresolved

      nit: ASSERT_TRUE since it being false would cause a crash.

      Line 1383, Patchset 5 (Latest): EXPECT_FALSE(token_manager->GetAuthToken(kMountainViewGeoId));
      Giovanni Ortuno Urquidi . unresolved

      super optional nit: I think we can use EXPECT_THAT so if it fails, it will print the token.

      Line 1419, Patchset 5 (Latest): base::RunLoop run_loop;
      task_environment_.GetMainThreadTaskRunner()->PostDelayedTask(
      FROM_HERE, run_loop.QuitClosure(), base::Minutes(2));
      run_loop.Run();
      Giovanni Ortuno Urquidi . unresolved

      Does `TaskEnvironment::FastForwardBy(TimeDelta delta)` not work here?

      Line 1428, Patchset 5 (Latest): token_manager->SetOnTryGetAuthTokensCompletedForTesting(
      task_environment_.QuitClosure());
      token_manager->SetCurrentGeo(kMountainViewGeoId);
      task_environment_.RunUntilQuit();
      Giovanni Ortuno Urquidi . unresolved

      Out of curiosity, why do we use a task_environment QuitClosure() here but a RunLoop QuitClosure() above?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Andrew Williams
      • Jon Toohill
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not 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: I6a6a696493334f47d6b3acd4da88fcc21762069d
        Gerrit-Change-Number: 6897199
        Gerrit-PatchSet: 5
        Gerrit-Owner: Jon Toohill <jtoo...@google.com>
        Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
        Gerrit-Reviewer: Jon Toohill <jtoo...@google.com>
        Gerrit-CC: Dustin Mitchell <djmi...@chromium.org>
        Gerrit-CC: Giovanni Ortuno Urquidi <ort...@chromium.org>
        Gerrit-Attention: Andrew Williams <awi...@chromium.org>
        Gerrit-Attention: Jon Toohill <jtoo...@google.com>
        Gerrit-Comment-Date: Tue, 02 Sep 2025 20:28:52 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Andrew Williams (Gerrit)

        unread,
        Sep 2, 2025, 5:03:23 PM (6 days ago) Sep 2
        to Jon Toohill, Giovanni Ortuno Urquidi, Chromium LUCI CQ, Dustin Mitchell, AyeAye, net-r...@chromium.org, network-ser...@chromium.org, ortuno...@chromium.org, aakalla...@chromium.org, fenced-fra...@chromium.org, rizvis...@google.com
        Attention needed from Jon Toohill

        Andrew Williams added 1 comment

        File chrome/browser/net/profile_network_context_service.cc
        Line 1578, Patchset 5 (Latest): if (profile_->IsIncognitoProfile()) {
        network_context_params->initial_ip_protection_tokens =
        ipp_core_host->TakeRecycledTokens();
        }
        Giovanni Ortuno Urquidi . unresolved

        Just double checking here. I'm a bit confused. Above we are retrieving IPPCoreHost for the current profile which in this case is the incognito profile. But wouldn't the retrieved IPPCoreHost be brand new (and thus have no tokens) if the incognito window was closed before?

        Would it be possible to add a browser test?

        Andrew Williams

        The IPPCoreHost is shared between the regular profile window and the incognito profile because of this line: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ip_protection/ip_protection_core_host_factory.cc;l=45;drc=4f61c109af56a9de48410e4c34ff3b4311431ec6

        There's some more documentation on this here: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/profiles/profile_selections.h;l=29;drc=bb80bda6b2e71bde7c38303c48484e86f6976e3c

        We have to do it this way because the user's OAuth token is only available to the regular browsing mode profile. We do have some browser tests for this behavior:, for example: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ip_protection/ip_protection_core_host_browsertest.cc;l=398;drc=88400a0631b078da8d308a44873084c053bd1c65

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Jon Toohill
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not 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: I6a6a696493334f47d6b3acd4da88fcc21762069d
        Gerrit-Change-Number: 6897199
        Gerrit-PatchSet: 5
        Gerrit-Owner: Jon Toohill <jtoo...@google.com>
        Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
        Gerrit-Reviewer: Jon Toohill <jtoo...@google.com>
        Gerrit-CC: Dustin Mitchell <djmi...@chromium.org>
        Gerrit-CC: Giovanni Ortuno Urquidi <ort...@chromium.org>
        Gerrit-Attention: Jon Toohill <jtoo...@google.com>
        Gerrit-Comment-Date: Tue, 02 Sep 2025 21:03:15 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Andrew Williams (Gerrit)

        unread,
        Sep 2, 2025, 5:06:04 PM (6 days ago) Sep 2
        to Jon Toohill, Giovanni Ortuno Urquidi, Chromium LUCI CQ, Dustin Mitchell, AyeAye, net-r...@chromium.org, network-ser...@chromium.org, ortuno...@chromium.org, aakalla...@chromium.org, fenced-fra...@chromium.org, rizvis...@google.com
        Attention needed from Jon Toohill

        Andrew Williams added 1 comment

        File chrome/browser/net/profile_network_context_service.cc
        Line 1578, Patchset 5 (Latest): if (profile_->IsIncognitoProfile()) {
        network_context_params->initial_ip_protection_tokens =
        ipp_core_host->TakeRecycledTokens();
        }
        Giovanni Ortuno Urquidi . unresolved

        Just double checking here. I'm a bit confused. Above we are retrieving IPPCoreHost for the current profile which in this case is the incognito profile. But wouldn't the retrieved IPPCoreHost be brand new (and thus have no tokens) if the incognito window was closed before?

        Would it be possible to add a browser test?

        Andrew Williams

        The IPPCoreHost is shared between the regular profile window and the incognito profile because of this line: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ip_protection/ip_protection_core_host_factory.cc;l=45;drc=4f61c109af56a9de48410e4c34ff3b4311431ec6

        There's some more documentation on this here: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/profiles/profile_selections.h;l=29;drc=bb80bda6b2e71bde7c38303c48484e86f6976e3c

        We have to do it this way because the user's OAuth token is only available to the regular browsing mode profile. We do have some browser tests for this behavior:, for example: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ip_protection/ip_protection_core_host_browsertest.cc;l=398;drc=88400a0631b078da8d308a44873084c053bd1c65

        Andrew Williams

        to clarify instead of the "regular browsing mode profile", I should say the regular browsing mode IPPCoreHost KeyedService instance

        Gerrit-Comment-Date: Tue, 02 Sep 2025 21:05:57 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Andrew Williams <awi...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Andrew Williams (Gerrit)

        unread,
        Sep 2, 2025, 10:33:07 PM (6 days ago) Sep 2
        to Jon Toohill, Giovanni Ortuno Urquidi, Chromium LUCI CQ, Dustin Mitchell, AyeAye, net-r...@chromium.org, network-ser...@chromium.org, ortuno...@chromium.org, aakalla...@chromium.org, fenced-fra...@chromium.org, rizvis...@google.com
        Attention needed from Jon Toohill

        Andrew Williams voted and added 5 comments

        Votes added by Andrew Williams

        Code-Review+1

        5 comments

        Patchset-level comments
        Andrew Williams . resolved

        LGTM with a few more nits and % Gio's comments. Thanks!

        File chrome/browser/ip_protection/ip_protection_core_host_unittest.cc
        Line 62, Patchset 5 (Latest):using ::testing::Optional;
        Andrew Williams . unresolved

        nit: looks like this isn't used anymore, should we undo the change to this file?

        File components/ip_protection/common/ip_protection_core_impl_mojo.cc
        Line 86, Patchset 1: ? MakeTokenManagerMap(this, core_host_remote, initial_tokens)
        Andrew Williams . resolved

        nit: can std::move(initial_tokens)

        Jon Toohill

        Done, and updated MakeTokenManagerMap to take a value rather than a reference.

        Andrew Williams

        ah right, thanks!

        File components/ip_protection/common/ip_protection_token_manager_impl.cc
        Line 103, Patchset 5 (Latest): cache_by_geo_[GetGeoIdFromGeoHint(token.geo_hint)].push_back(
        Andrew Williams . unresolved

        nit: can we move the `GetGeoIdFromGeoHint` call to it's own statement so we don't have to think about sequencing when trying to determine whether this code might use-after-move?

        https://clang.llvm.org/extra/clang-tidy/checks/bugprone/use-after-move.html#unsequenced-moves-uses-and-reinitializations

        File components/ip_protection/common/ip_protection_token_manager_impl_unittest.cc
        Gerrit-Comment-Date: Wed, 03 Sep 2025 02:33:00 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        Comment-In-Reply-To: Andrew Williams <awi...@chromium.org>
        Comment-In-Reply-To: Jon Toohill <jtoo...@google.com>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Jon Toohill (Gerrit)

        unread,
        Sep 3, 2025, 12:18:04 AM (6 days ago) Sep 3
        to Andrew Williams, Giovanni Ortuno Urquidi, Chromium LUCI CQ, Dustin Mitchell, AyeAye, net-r...@chromium.org, network-ser...@chromium.org, ortuno...@chromium.org, aakalla...@chromium.org, fenced-fra...@chromium.org, rizvis...@google.com
        Attention needed from Andrew Williams and Giovanni Ortuno Urquidi

        Jon Toohill voted and added 11 comments

        Votes added by Jon Toohill

        Auto-Submit+1
        Commit-Queue+1

        11 comments

        File chrome/browser/ip_protection/ip_protection_core_host_unittest.cc
        Line 62, Patchset 5:using ::testing::Optional;
        Andrew Williams . resolved

        nit: looks like this isn't used anymore, should we undo the change to this file?

        Jon Toohill

        Done

        File chrome/browser/net/profile_network_context_service.cc
        Line 1578, Patchset 5: if (profile_->IsIncognitoProfile()) {

        network_context_params->initial_ip_protection_tokens =
        ipp_core_host->TakeRecycledTokens();
        }
        Giovanni Ortuno Urquidi . resolved

        Just double checking here. I'm a bit confused. Above we are retrieving IPPCoreHost for the current profile which in this case is the incognito profile. But wouldn't the retrieved IPPCoreHost be brand new (and thus have no tokens) if the incognito window was closed before?

        Would it be possible to add a browser test?

        Andrew Williams

        The IPPCoreHost is shared between the regular profile window and the incognito profile because of this line: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ip_protection/ip_protection_core_host_factory.cc;l=45;drc=4f61c109af56a9de48410e4c34ff3b4311431ec6

        There's some more documentation on this here: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/profiles/profile_selections.h;l=29;drc=bb80bda6b2e71bde7c38303c48484e86f6976e3c

        We have to do it this way because the user's OAuth token is only available to the regular browsing mode profile. We do have some browser tests for this behavior:, for example: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ip_protection/ip_protection_core_host_browsertest.cc;l=398;drc=88400a0631b078da8d308a44873084c053bd1c65

        Andrew Williams

        to clarify instead of the "regular browsing mode profile", I should say the regular browsing mode IPPCoreHost KeyedService instance

        Jon Toohill

        Marked as resolved.

        File components/ip_protection/common/ip_protection_core_impl_mojo.cc
        Line 46, Patchset 5: std::optional<IpProtectionCoreImpl::InitialTokensMap> initial_tokens) {
        Giovanni Ortuno Urquidi . resolved

        no longer optional?

        Jon Toohill

        Done

        File components/ip_protection/common/ip_protection_token_manager_impl.cc
        Line 69, Patchset 5: if (!initial_tokens.empty()) {
        Giovanni Ortuno Urquidi . resolved

        nit: Move this to ProcessInitialTokens(). I think it would be good to encapsulate all the logic to process tokens (including skipping it if it's empty).

        Jon Toohill

        Done

        Line 103, Patchset 5: cache_by_geo_[GetGeoIdFromGeoHint(token.geo_hint)].push_back(
        Andrew Williams . resolved

        nit: can we move the `GetGeoIdFromGeoHint` call to it's own statement so we don't have to think about sequencing when trying to determine whether this code might use-after-move?

        https://clang.llvm.org/extra/clang-tidy/checks/bugprone/use-after-move.html#unsequenced-moves-uses-and-reinitializations

        Jon Toohill

        Done

        File components/ip_protection/common/ip_protection_token_manager_impl_unittest.cc
        Line 264, Patchset 5: /*initial_tokens=*/std::vector<BlindSignedAuthToken>{},
        Giovanni Ortuno Urquidi . resolved
        nit: Use a regular constructor unless it's not possible[[1]](https://chromium.googlesource.com/chromium/src/+/lkgr/styleguide/c++/c++-dos-and-donts.md#variable-initialization). Or we could do:
        ```suggestion
        /*initial_tokens=*/{},
        ```
        Jon Toohill

        Done

        Line 1379, Patchset 5: EXPECT_TRUE(token);
        Giovanni Ortuno Urquidi . resolved

        nit: ASSERT_TRUE since it being false would cause a crash.

        Jon Toohill

        Done

        Line 1383, Patchset 5: EXPECT_FALSE(token_manager->GetAuthToken(kMountainViewGeoId));
        Giovanni Ortuno Urquidi . resolved

        super optional nit: I think we can use EXPECT_THAT so if it fails, it will print the token.

        Jon Toohill

        Acknowledged

        Line 1419, Patchset 5: base::RunLoop run_loop;

        task_environment_.GetMainThreadTaskRunner()->PostDelayedTask(
        FROM_HERE, run_loop.QuitClosure(), base::Minutes(2));
        run_loop.Run();
        Giovanni Ortuno Urquidi . resolved

        Does `TaskEnvironment::FastForwardBy(TimeDelta delta)` not work here?

        Jon Toohill

        It does, changed to use that instead. I had originally tried `FastForwardUntilNoTasksRemain()` and ran into test failures, and I incorrectly assumed `FastForwardBy()` would hit the same issues.

        Line 1428, Patchset 5: token_manager->SetOnTryGetAuthTokensCompletedForTesting(
        task_environment_.QuitClosure());
        token_manager->SetCurrentGeo(kMountainViewGeoId);
        task_environment_.RunUntilQuit();
        Giovanni Ortuno Urquidi . resolved

        Out of curiosity, why do we use a task_environment QuitClosure() here but a RunLoop QuitClosure() above?

        Jon Toohill

        Resolved by eliminating the RunLoop above.

        Line 1432, Patchset 5: ASSERT_TRUE(token_fetcher->GotAllExpectedMockCalls());
        Andrew Williams . resolved
        Jon Toohill

        Done

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Andrew Williams
        • Giovanni Ortuno Urquidi
        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: I6a6a696493334f47d6b3acd4da88fcc21762069d
        Gerrit-Change-Number: 6897199
        Gerrit-PatchSet: 6
        Gerrit-Owner: Jon Toohill <jtoo...@google.com>
        Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
        Gerrit-Reviewer: Jon Toohill <jtoo...@google.com>
        Gerrit-CC: Dustin Mitchell <djmi...@chromium.org>
        Gerrit-CC: Giovanni Ortuno Urquidi <ort...@chromium.org>
        Gerrit-Attention: Andrew Williams <awi...@chromium.org>
        Gerrit-Attention: Giovanni Ortuno Urquidi <ort...@chromium.org>
        Gerrit-Comment-Date: Wed, 03 Sep 2025 04:17:52 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        Comment-In-Reply-To: Andrew Williams <awi...@chromium.org>
        Comment-In-Reply-To: Giovanni Ortuno Urquidi <ort...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Andrew Williams (Gerrit)

        unread,
        Sep 3, 2025, 2:30:27 PM (5 days ago) Sep 3
        to Jon Toohill, Giovanni Ortuno Urquidi, Chromium LUCI CQ, Dustin Mitchell, AyeAye, net-r...@chromium.org, network-ser...@chromium.org, ortuno...@chromium.org, aakalla...@chromium.org, fenced-fra...@chromium.org, rizvis...@google.com
        Attention needed from Giovanni Ortuno Urquidi and Jon Toohill

        Andrew Williams voted and added 1 comment

        Votes added by Andrew Williams

        Code-Review+1

        1 comment

        File components/ip_protection/common/ip_protection_token_manager_impl.cc
        Line 105, Patchset 6 (Latest): const std::string& geo_id = GetGeoIdFromGeoHint(token.geo_hint);
        Andrew Williams . unresolved

        Since GetGeoIdFromGeoHint returns a std::string, would this be a const reference to a temporary variable that's created (and the const reference extends the lifetime of the temporary)? If so I wonder if it'd be simpler to just make geo_id a std::string

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Giovanni Ortuno Urquidi
        • Jon Toohill
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement is not 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: I6a6a696493334f47d6b3acd4da88fcc21762069d
          Gerrit-Change-Number: 6897199
          Gerrit-PatchSet: 6
          Gerrit-Owner: Jon Toohill <jtoo...@google.com>
          Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
          Gerrit-Reviewer: Jon Toohill <jtoo...@google.com>
          Gerrit-CC: Dustin Mitchell <djmi...@chromium.org>
          Gerrit-CC: Giovanni Ortuno Urquidi <ort...@chromium.org>
          Gerrit-Attention: Jon Toohill <jtoo...@google.com>
          Gerrit-Attention: Giovanni Ortuno Urquidi <ort...@chromium.org>
          Gerrit-Comment-Date: Wed, 03 Sep 2025 18:30:21 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Jon Toohill (Gerrit)

          unread,
          Sep 3, 2025, 3:59:13 PM (5 days ago) Sep 3
          to Andrew Williams, Giovanni Ortuno Urquidi, Chromium LUCI CQ, Dustin Mitchell, AyeAye, net-r...@chromium.org, network-ser...@chromium.org, ortuno...@chromium.org, aakalla...@chromium.org, fenced-fra...@chromium.org, rizvis...@google.com
          Attention needed from Andrew Williams and Giovanni Ortuno Urquidi

          Jon Toohill voted and added 1 comment

          Votes added by Jon Toohill

          Auto-Submit+1

          1 comment

          File components/ip_protection/common/ip_protection_token_manager_impl.cc
          Line 105, Patchset 6: const std::string& geo_id = GetGeoIdFromGeoHint(token.geo_hint);
          Andrew Williams . resolved

          Since GetGeoIdFromGeoHint returns a std::string, would this be a const reference to a temporary variable that's created (and the const reference extends the lifetime of the temporary)? If so I wonder if it'd be simpler to just make geo_id a std::string

          Jon Toohill

          Done

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Andrew Williams
          • Giovanni Ortuno Urquidi
          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: I6a6a696493334f47d6b3acd4da88fcc21762069d
          Gerrit-Change-Number: 6897199
          Gerrit-PatchSet: 7
          Gerrit-Owner: Jon Toohill <jtoo...@google.com>
          Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
          Gerrit-Reviewer: Jon Toohill <jtoo...@google.com>
          Gerrit-CC: Dustin Mitchell <djmi...@chromium.org>
          Gerrit-CC: Giovanni Ortuno Urquidi <ort...@chromium.org>
          Gerrit-Attention: Andrew Williams <awi...@chromium.org>
          Gerrit-Attention: Giovanni Ortuno Urquidi <ort...@chromium.org>
          Gerrit-Comment-Date: Wed, 03 Sep 2025 19:59:04 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          Comment-In-Reply-To: Andrew Williams <awi...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Andrew Williams (Gerrit)

          unread,
          Sep 3, 2025, 4:09:52 PM (5 days ago) Sep 3
          to Jon Toohill, Giovanni Ortuno Urquidi, Chromium LUCI CQ, Dustin Mitchell, AyeAye, net-r...@chromium.org, network-ser...@chromium.org, ortuno...@chromium.org, aakalla...@chromium.org, fenced-fra...@chromium.org, rizvis...@google.com
          Attention needed from Giovanni Ortuno Urquidi and Jon Toohill

          Andrew Williams voted

          Code-Review+1
          Commit-Queue+2
          Open in Gerrit

          Related details

          Attention is currently required from:
          • Giovanni Ortuno Urquidi
          • Jon Toohill
          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: I6a6a696493334f47d6b3acd4da88fcc21762069d
          Gerrit-Change-Number: 6897199
          Gerrit-PatchSet: 7
          Gerrit-Owner: Jon Toohill <jtoo...@google.com>
          Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
          Gerrit-Reviewer: Jon Toohill <jtoo...@google.com>
          Gerrit-CC: Dustin Mitchell <djmi...@chromium.org>
          Gerrit-CC: Giovanni Ortuno Urquidi <ort...@chromium.org>
          Gerrit-Attention: Jon Toohill <jtoo...@google.com>
          Gerrit-Attention: Giovanni Ortuno Urquidi <ort...@chromium.org>
          Gerrit-Comment-Date: Wed, 03 Sep 2025 20:09:46 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          gwsq (Gerrit)

          unread,
          Sep 3, 2025, 4:14:44 PM (5 days ago) Sep 3
          to Jon Toohill, Chromium IPC Reviews, Tom Sepez, Fred Shih, Tsuyoshi Horo, Andrew Williams, Giovanni Ortuno Urquidi, Chromium LUCI CQ, Dustin Mitchell, AyeAye, net-r...@chromium.org, network-ser...@chromium.org, ortuno...@chromium.org, aakalla...@chromium.org, fenced-fra...@chromium.org, rizvis...@google.com
          Attention needed from Andrew Williams, Fred Shih, Giovanni Ortuno Urquidi, Tom Sepez and Tsuyoshi Horo

          Message from gwsq

          From googleclient/chrome/chromium_gwsq/ipc/config.gwsq:
          Shadow: ff...@chromium.org; IPC: tse...@chromium.org

          📎 It looks like you’re making a possibly security-sensitive change! 📎 IPC security review isn’t a rubberstamp, so your friendly security reviewer will need a fair amount of context to review your CL effectively. Please review your CL description and code comments to make sure they provide context for someone unfamiliar with your project/area. Pay special attention to where data comes from and which processes it flows between (and their privilege levels). Feel free to point your security reviewer at design docs, bugs, or other links if you can’t reasonably make a self-contained CL description. (Also see https://cbea.ms/git-commit/).

          Shadow IPC reviewer(s): ff...@chromium.org. Please conduct an IPC review and CR+1 when satisfied. Remember to add the main reviewers to the attention set if needed.

          Main IPC reviewer(s): tse...@chromium.org. Please wait for the shadowed IPC reviewer to CR+1 before reviewing.

          Shadowed: ff...@chromium.org

          Reviewer source(s):
          ff...@chromium.org, tse...@chromium.org is from context(googleclient/chrome/chromium_gwsq/ipc/config.gwsq)

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Andrew Williams
          • Fred Shih
          • Giovanni Ortuno Urquidi
          • Tom Sepez
          • Tsuyoshi Horo
          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: I6a6a696493334f47d6b3acd4da88fcc21762069d
          Gerrit-Change-Number: 6897199
          Gerrit-PatchSet: 7
          Gerrit-Owner: Jon Toohill <jtoo...@google.com>
          Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
          Gerrit-Reviewer: Fred Shih <ff...@chromium.org>
          Gerrit-Reviewer: Jon Toohill <jtoo...@google.com>
          Gerrit-Reviewer: Tom Sepez <tse...@chromium.org>
          Gerrit-Reviewer: Tsuyoshi Horo <ho...@chromium.org>
          Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
          Gerrit-CC: Dustin Mitchell <djmi...@chromium.org>
          Gerrit-CC: Giovanni Ortuno Urquidi <ort...@chromium.org>
          Gerrit-CC: gwsq
          Gerrit-Attention: Andrew Williams <awi...@chromium.org>
          Gerrit-Attention: Fred Shih <ff...@chromium.org>
          Gerrit-Attention: Giovanni Ortuno Urquidi <ort...@chromium.org>
          Gerrit-Attention: Tom Sepez <tse...@chromium.org>
          Gerrit-Attention: Tsuyoshi Horo <ho...@chromium.org>
          Gerrit-Comment-Date: Wed, 03 Sep 2025 20:14:32 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Fred Shih (Gerrit)

          unread,
          Sep 3, 2025, 4:43:21 PM (5 days ago) Sep 3
          to Jon Toohill, Chromium IPC Reviews, Tom Sepez, Tsuyoshi Horo, Andrew Williams, Giovanni Ortuno Urquidi, Chromium LUCI CQ, Dustin Mitchell, AyeAye, net-r...@chromium.org, network-ser...@chromium.org, ortuno...@chromium.org, aakalla...@chromium.org, fenced-fra...@chromium.org, rizvis...@google.com
          Attention needed from Andrew Williams, Giovanni Ortuno Urquidi, Tom Sepez and Tsuyoshi Horo

          Fred Shih voted and added 1 comment

          Votes added by Fred Shih

          Code-Review+1
          Commit-Queue+2

          1 comment

          Patchset-level comments
          File-level comment, Patchset 7 (Latest):
          Fred Shih . resolved

          mojo lgtm

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Andrew Williams
          • Giovanni Ortuno Urquidi
          • Tom Sepez
          • Tsuyoshi Horo
            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: I6a6a696493334f47d6b3acd4da88fcc21762069d
              Gerrit-Change-Number: 6897199
              Gerrit-PatchSet: 7
              Gerrit-Owner: Jon Toohill <jtoo...@google.com>
              Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
              Gerrit-Reviewer: Fred Shih <ff...@chromium.org>
              Gerrit-Reviewer: Jon Toohill <jtoo...@google.com>
              Gerrit-Reviewer: Tom Sepez <tse...@chromium.org>
              Gerrit-Reviewer: Tsuyoshi Horo <ho...@chromium.org>
              Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
              Gerrit-CC: Dustin Mitchell <djmi...@chromium.org>
              Gerrit-CC: Giovanni Ortuno Urquidi <ort...@chromium.org>
              Gerrit-CC: gwsq
              Gerrit-Attention: Andrew Williams <awi...@chromium.org>
              Gerrit-Attention: Giovanni Ortuno Urquidi <ort...@chromium.org>
              Gerrit-Attention: Tom Sepez <tse...@chromium.org>
              Gerrit-Attention: Tsuyoshi Horo <ho...@chromium.org>
              Gerrit-Comment-Date: Wed, 03 Sep 2025 20:43:10 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Tom Sepez (Gerrit)

              unread,
              Sep 3, 2025, 5:05:55 PM (5 days ago) Sep 3
              to Jon Toohill, Fred Shih, Chromium IPC Reviews, Tsuyoshi Horo, Andrew Williams, Giovanni Ortuno Urquidi, Chromium LUCI CQ, Dustin Mitchell, AyeAye, net-r...@chromium.org, network-ser...@chromium.org, ortuno...@chromium.org, aakalla...@chromium.org, fenced-fra...@chromium.org, rizvis...@google.com
              Attention needed from Andrew Williams, Fred Shih, Giovanni Ortuno Urquidi, Jon Toohill and Tsuyoshi Horo

              Tom Sepez added 1 comment

              Patchset-level comments
              Tom Sepez . resolved

              mechanically, it seems OK, but I'm not that familiar with the design. Is there a security person who has been working with you on this? If so, they might be the appropriate reviewer.

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Andrew Williams
              • Fred Shih
              • Giovanni Ortuno Urquidi
              • Jon Toohill
              • Tsuyoshi Horo
              Gerrit-Attention: Fred Shih <ff...@chromium.org>
              Gerrit-Attention: Jon Toohill <jtoo...@google.com>
              Gerrit-Attention: Giovanni Ortuno Urquidi <ort...@chromium.org>
              Gerrit-Attention: Tsuyoshi Horo <ho...@chromium.org>
              Gerrit-Comment-Date: Wed, 03 Sep 2025 21:05:39 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Jon Toohill (Gerrit)

              unread,
              Sep 4, 2025, 5:46:59 PM (4 days ago) Sep 4
              to Fred Shih, Chromium IPC Reviews, Tom Sepez, Tsuyoshi Horo, Andrew Williams, Giovanni Ortuno Urquidi, Chromium LUCI CQ, Dustin Mitchell, AyeAye, net-r...@chromium.org, network-ser...@chromium.org, ortuno...@chromium.org, aakalla...@chromium.org, fenced-fra...@chromium.org, rizvis...@google.com
              Attention needed from Andrew Williams, Fred Shih, Giovanni Ortuno Urquidi, Tom Sepez and Tsuyoshi Horo

              Jon Toohill voted and added 1 comment

              Votes added by Jon Toohill

              Auto-Submit+1

              1 comment

              Patchset-level comments
              Tom Sepez . resolved

              mechanically, it seems OK, but I'm not that familiar with the design. Is there a security person who has been working with you on this? If so, they might be the appropriate reviewer.

              Jon Toohill

              No, we don't have a dedicated security contact for this project. I've expanded the commit description and field comments to provide more context around what data is being passed between processes, and the associated bug also links to a design doc with further details.

              Let me know if you still have specific concerns that I haven't addressed, and I'll do my best to clarify!

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Andrew Williams
              • Fred Shih
              • Giovanni Ortuno Urquidi
              • Tom Sepez
              • Tsuyoshi Horo
              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: I6a6a696493334f47d6b3acd4da88fcc21762069d
                Gerrit-Change-Number: 6897199
                Gerrit-PatchSet: 8
                Gerrit-Owner: Jon Toohill <jtoo...@google.com>
                Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
                Gerrit-Reviewer: Fred Shih <ff...@chromium.org>
                Gerrit-Reviewer: Jon Toohill <jtoo...@google.com>
                Gerrit-Reviewer: Tom Sepez <tse...@chromium.org>
                Gerrit-Reviewer: Tsuyoshi Horo <ho...@chromium.org>
                Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
                Gerrit-CC: Dustin Mitchell <djmi...@chromium.org>
                Gerrit-CC: Giovanni Ortuno Urquidi <ort...@chromium.org>
                Gerrit-CC: gwsq
                Gerrit-Attention: Andrew Williams <awi...@chromium.org>
                Gerrit-Attention: Fred Shih <ff...@chromium.org>
                Gerrit-Attention: Giovanni Ortuno Urquidi <ort...@chromium.org>
                Gerrit-Attention: Tom Sepez <tse...@chromium.org>
                Gerrit-Attention: Tsuyoshi Horo <ho...@chromium.org>
                Gerrit-Comment-Date: Thu, 04 Sep 2025 21:46:49 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: Yes
                Comment-In-Reply-To: Tom Sepez <tse...@chromium.org>
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                Tom Sepez (Gerrit)

                unread,
                Sep 4, 2025, 5:57:56 PM (4 days ago) Sep 4
                to Jon Toohill, Fred Shih, Chromium IPC Reviews, Tsuyoshi Horo, Andrew Williams, Giovanni Ortuno Urquidi, Chromium LUCI CQ, Dustin Mitchell, AyeAye, net-r...@chromium.org, network-ser...@chromium.org, ortuno...@chromium.org, aakalla...@chromium.org, fenced-fra...@chromium.org, rizvis...@google.com
                Attention needed from Andrew Williams, Fred Shih, Giovanni Ortuno Urquidi, Jon Toohill and Tsuyoshi Horo

                Tom Sepez added 1 comment

                Patchset-level comments
                Tom Sepez . resolved

                mechanically, it seems OK, but I'm not that familiar with the design. Is there a security person who has been working with you on this? If so, they might be the appropriate reviewer.

                Jon Toohill

                No, we don't have a dedicated security contact for this project. I've expanded the commit description and field comments to provide more context around what data is being passed between processes, and the associated bug also links to a design doc with further details.

                Let me know if you still have specific concerns that I haven't addressed, and I'll do my best to clarify!

                Tom Sepez

                Thanks, that makes much more sense, and I think you're OK from a security perspective, but the privacy issues may be more subtle. I've left comments on the design doc. If we know that the privacy team is OK with this, then we should be OK.

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Andrew Williams
                • Fred Shih
                • Giovanni Ortuno Urquidi
                • Jon Toohill
                • Tsuyoshi Horo
                Gerrit-Attention: Jon Toohill <jtoo...@google.com>
                Gerrit-Attention: Giovanni Ortuno Urquidi <ort...@chromium.org>
                Gerrit-Attention: Tsuyoshi Horo <ho...@chromium.org>
                Gerrit-Comment-Date: Thu, 04 Sep 2025 21:57:45 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: No
                Comment-In-Reply-To: Jon Toohill <jtoo...@google.com>
                Comment-In-Reply-To: Tom Sepez <tse...@chromium.org>
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                Tom Sepez (Gerrit)

                unread,
                Sep 4, 2025, 7:16:14 PM (4 days ago) Sep 4
                to Jon Toohill, Fred Shih, Chromium IPC Reviews, Tsuyoshi Horo, Andrew Williams, Giovanni Ortuno Urquidi, Chromium LUCI CQ, Dustin Mitchell, AyeAye, net-r...@chromium.org, network-ser...@chromium.org, ortuno...@chromium.org, aakalla...@chromium.org, fenced-fra...@chromium.org, rizvis...@google.com
                Attention needed from Andrew Williams, Fred Shih, Giovanni Ortuno Urquidi, Jon Toohill and Tsuyoshi Horo

                Tom Sepez voted and added 1 comment

                Votes added by Tom Sepez

                Code-Review+1
                Commit-Queue+2

                1 comment

                Patchset-level comments
                File-level comment, Patchset 8 (Latest):
                Tom Sepez . resolved

                Privacy discussed offline and is minimal.

                Gerrit-Comment-Date: Thu, 04 Sep 2025 23:16:00 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: Yes
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                Tsuyoshi Horo (Gerrit)

                unread,
                Sep 4, 2025, 7:43:20 PM (4 days ago) Sep 4
                to Jon Toohill, Tom Sepez, Fred Shih, Chromium IPC Reviews, Andrew Williams, Giovanni Ortuno Urquidi, Chromium LUCI CQ, Dustin Mitchell, AyeAye, net-r...@chromium.org, network-ser...@chromium.org, ortuno...@chromium.org, aakalla...@chromium.org, fenced-fra...@chromium.org, rizvis...@google.com
                Attention needed from Andrew Williams, Fred Shih, Giovanni Ortuno Urquidi, Jon Toohill and Tom Sepez

                Tsuyoshi Horo voted and added 1 comment

                Votes added by Tsuyoshi Horo

                Code-Review+1

                1 comment

                Patchset-level comments
                Tsuyoshi Horo . resolved

                lgtm

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Andrew Williams
                • Fred Shih
                • Giovanni Ortuno Urquidi
                • Jon Toohill
                • Tom Sepez
                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: I6a6a696493334f47d6b3acd4da88fcc21762069d
                Gerrit-Change-Number: 6897199
                Gerrit-PatchSet: 8
                Gerrit-Owner: Jon Toohill <jtoo...@google.com>
                Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
                Gerrit-Reviewer: Fred Shih <ff...@chromium.org>
                Gerrit-Reviewer: Jon Toohill <jtoo...@google.com>
                Gerrit-Reviewer: Tom Sepez <tse...@chromium.org>
                Gerrit-Reviewer: Tsuyoshi Horo <ho...@chromium.org>
                Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
                Gerrit-CC: Dustin Mitchell <djmi...@chromium.org>
                Gerrit-CC: Giovanni Ortuno Urquidi <ort...@chromium.org>
                Gerrit-CC: gwsq
                Gerrit-Attention: Andrew Williams <awi...@chromium.org>
                Gerrit-Attention: Fred Shih <ff...@chromium.org>
                Gerrit-Attention: Jon Toohill <jtoo...@google.com>
                Gerrit-Attention: Giovanni Ortuno Urquidi <ort...@chromium.org>
                Gerrit-Attention: Tom Sepez <tse...@chromium.org>
                Gerrit-Comment-Date: Thu, 04 Sep 2025 23:42:50 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: Yes
                satisfied_requirement
                open
                diffy

                Jon Toohill (Gerrit)

                unread,
                Sep 4, 2025, 10:43:10 PM (4 days ago) Sep 4
                to Tsuyoshi Horo, Tom Sepez, Fred Shih, Chromium IPC Reviews, Andrew Williams, Giovanni Ortuno Urquidi, Chromium LUCI CQ, Dustin Mitchell, AyeAye, net-r...@chromium.org, network-ser...@chromium.org, ortuno...@chromium.org, aakalla...@chromium.org, fenced-fra...@chromium.org, rizvis...@google.com
                Attention needed from Andrew Williams, Fred Shih, Giovanni Ortuno Urquidi and Tom Sepez

                Jon Toohill voted Commit-Queue+2

                Commit-Queue+2
                Open in Gerrit

                Related details

                Attention is currently required from:
                • Andrew Williams
                • Fred Shih
                • Giovanni Ortuno Urquidi
                • Tom Sepez
                Gerrit-Attention: Giovanni Ortuno Urquidi <ort...@chromium.org>
                Gerrit-Attention: Tom Sepez <tse...@chromium.org>
                Gerrit-Comment-Date: Fri, 05 Sep 2025 02:42:59 +0000
                Gerrit-HasComments: No
                Gerrit-Has-Labels: Yes
                satisfied_requirement
                open
                diffy

                Chromium LUCI CQ (Gerrit)

                unread,
                Sep 4, 2025, 11:35:10 PM (4 days ago) Sep 4
                to Jon Toohill, Tsuyoshi Horo, Tom Sepez, Fred Shih, Chromium IPC Reviews, Andrew Williams, Giovanni Ortuno Urquidi, Dustin Mitchell, AyeAye, net-r...@chromium.org, network-ser...@chromium.org, ortuno...@chromium.org, aakalla...@chromium.org, fenced-fra...@chromium.org, rizvis...@google.com

                Chromium LUCI CQ submitted the change

                Change information

                Commit message:
                Plumb orphaned tokens through network context creation

                This change implements the logic for pre-warming the IP Protection
                token cache with orphaned tokens from previous Incognito sessions by
                passing tokens from the browser process (high-privilege) to the new
                Incognito network context within the network service process
                (sandboxed). This parallels the existing token fetching flow, where the
                browser process obtains signed tokens from a trusted server before
                passing them to the network service process.

                The tokens themselves are trusted data that have already been parsed
                and validated when they were originally fetched, and are designed to
                minimize the risk of linking multiple Incognito sessions from the same
                user.
                Bug: 440151189
                Change-Id: I6a6a696493334f47d6b3acd4da88fcc21762069d
                Auto-Submit: Jon Toohill <jtoo...@google.com>
                Commit-Queue: Jon Toohill <jtoo...@google.com>
                Reviewed-by: Tom Sepez <tse...@chromium.org>
                Reviewed-by: Tsuyoshi Horo <ho...@chromium.org>
                Cr-Commit-Position: refs/heads/main@{#1511299}
                Files:
                • M chrome/browser/ip_protection/ip_protection_core_host.h
                • M chrome/browser/net/profile_network_context_service.cc
                • M components/ip_protection/common/ip_protection_core_impl.h
                • M components/ip_protection/common/ip_protection_core_impl_mojo.cc
                • M components/ip_protection/common/ip_protection_core_impl_mojo.h
                • M components/ip_protection/common/ip_protection_token_manager_impl.cc
                • M components/ip_protection/common/ip_protection_token_manager_impl.h
                • M components/ip_protection/common/ip_protection_token_manager_impl_unittest.cc
                • M services/network/network_context.cc
                • M services/network/public/mojom/network_context.mojom
                Change size: M
                Delta: 10 files changed, 169 insertions(+), 32 deletions(-)
                Branch: refs/heads/main
                Submit Requirements:
                • requirement satisfiedCode-Review: +1 by Tsuyoshi Horo, +1 by Tom Sepez
                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: I6a6a696493334f47d6b3acd4da88fcc21762069d
                Gerrit-Change-Number: 6897199
                Gerrit-PatchSet: 9
                Gerrit-Owner: Jon Toohill <jtoo...@google.com>
                Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
                Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
                Gerrit-Reviewer: Fred Shih <ff...@chromium.org>
                Gerrit-Reviewer: Jon Toohill <jtoo...@google.com>
                Gerrit-Reviewer: Tom Sepez <tse...@chromium.org>
                Gerrit-Reviewer: Tsuyoshi Horo <ho...@chromium.org>
                Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
                open
                diffy
                satisfied_requirement
                Reply all
                Reply to author
                Forward
                0 new messages