[fuchsia] Finish push messaging api implementation [chromium/src : main]

0 views
Skip to first unread message

Peter Beverloo (Gerrit)

unread,
Nov 4, 2025, 9:14:50 AM (11 days ago) Nov 4
to Zijie He, Peter Beverloo, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, dmurph+watching...@chromium.org, edgesto...@microsoft.com, storage...@chromium.org, blink-...@chromium.org, fuchsia...@chromium.org
Attention needed from Zijie He

Peter Beverloo added 5 comments

Patchset-level comments
File-level comment, Patchset 20 (Latest):
Peter Beverloo . resolved

I think this looks fine and you don't have to block on me, but these are a lot of TODOs, including questionable, insecure code, that you're planning to check in. Please ask one of the //fuchsia_web(/web engine) OWNERS to approve that.

File fuchsia_web/webengine/browser/platform_notification_service_impl.cc
Line 39, Patchset 20 (Latest): const std::string& notification_id) {}
Peter Beverloo . unresolved

nit: I'd suggest putting `NOTIMPLEMENTED()` in these implementations, they don't hit very often but it makes it much easier to diagnose why something isn't working later on.

Line 58, Patchset 20 (Latest): return 0;
Peter Beverloo . unresolved

fyi: Always returning the same value will mean that new notifications may overwrite data for older notifications in the //content-level NotificationDatabase.

File fuchsia_web/webengine/browser/push_messaging_service_impl.cc
Line 264, Patchset 20 (Latest): base::FilePath("/tmp"),
Peter Beverloo . unresolved

This is a bit of a strange decision - the GCM Driver will store e.g. public/private key pairs in this directory, which in /tmp may become readable (or at least observable) by other users. Is this important?

Line 592, Patchset 20 (Latest): break;
case blink::mojom::PushEventStatus::SERVICE_WORKER_ERROR:
// Do nothing, and hope the error is transient.
break;
case blink::mojom::PushEventStatus::NO_APP_LEVEL_PERMISSION_IGNORE:
// Do nothing, ignore push messages during the grace period.
break;
case blink::mojom::PushEventStatus::NO_APP_LEVEL_PERMISSION_UNSUBSCRIBE:
unsubscribe_reason =
blink::mojom::PushUnregistrationReason::NO_APP_LEVEL_PERMISSION;
break;
case blink::mojom::PushEventStatus::UNKNOWN_APP_ID:
unsubscribe_reason =
blink::mojom::PushUnregistrationReason::DELIVERY_UNKNOWN_APP_ID;
break;
case blink::mojom::PushEventStatus::PERMISSION_DENIED:
unsubscribe_reason =
blink::mojom::PushUnregistrationReason::DELIVERY_PERMISSION_DENIED;
break;
case blink::mojom::PushEventStatus::NO_SERVICE_WORKER:
unsubscribe_reason =
blink::mojom::PushUnregistrationReason::DELIVERY_NO_SERVICE_WORKER;
break;
case blink::mojom::PushEventStatus::PERMISSION_REVOKED_ABUSIVE:
unsubscribe_reason =
blink::mojom::PushUnregistrationReason::PERMISSION_REVOKED_ABUSIVE;
break;
case blink::mojom::PushEventStatus::PERMISSION_REVOKED_DISRUPTIVE:
unsubscribe_reason =
blink::mojom::PushUnregistrationReason::PERMISSION_REVOKED_DISRUPTIVE;
break;
}
Peter Beverloo . unresolved

Please fix this WARNING reported by Code Duplication: Duplicate code found. Review for potential refactoring.
This block matches lines...

Duplicate code found. Review for potential refactoring.
This block matches lines 617-648 in [push_messaging_service_impl.cc](https://source.corp.google.com/h/chromium/chromium/src/+/main:chrome/browser/push_messaging/push_messaging_service_impl.cc;l=617-648;drc=95f912cedcfed49b1360d308897f441882b57f13).

----------------

Was this useful? [Yes 👍](http://go/gerrit-code-duplication-thumbs-up?title=[Yes%20👍]%20https://chromium-review.googlesource.com/c/chromium/src/+/7047169/20) / [No 👎](http://go/gerrit-code-duplication-thumbs-down?title=[No%20👎]%20https://chromium-review.googlesource.com/c/chromium/src/+/7047169/20)
Please provide additional feedback at go/pdeio-code-duplication-bug

Open in Gerrit

Related details

Attention is currently required from:
  • Zijie He
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: If7206ad7d9fe435722a288d3eac6df5f2bdab25f
Gerrit-Change-Number: 7047169
Gerrit-PatchSet: 20
Gerrit-Owner: Zijie He <zij...@google.com>
Gerrit-Reviewer: Peter Beverloo <pe...@chromium.org>
Gerrit-Reviewer: Zijie He <zij...@google.com>
Gerrit-Attention: Zijie He <zij...@google.com>
Gerrit-Comment-Date: Tue, 04 Nov 2025 14:14:36 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Zijie He (Gerrit)

unread,
Nov 6, 2025, 6:53:11 PM (8 days ago) Nov 6
to Sergey Ulanov, Peter Beverloo, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, dmurph+watching...@chromium.org, edgesto...@microsoft.com, storage...@chromium.org, blink-...@chromium.org, fuchsia...@chromium.org
Attention needed from Peter Beverloo and Sergey Ulanov

Zijie He added 5 comments

Patchset-level comments
File-level comment, Patchset 24 (Latest):
Zijie He . resolved

Also add Sergey as the fuchsia_web owner.

File fuchsia_web/webengine/browser/platform_notification_service_impl.cc
Line 39, Patchset 20: const std::string& notification_id) {}
Peter Beverloo . resolved

nit: I'd suggest putting `NOTIMPLEMENTED()` in these implementations, they don't hit very often but it makes it much easier to diagnose why something isn't working later on.

Zijie He

Done

Line 58, Patchset 20: return 0;
Peter Beverloo . resolved

fyi: Always returning the same value will mean that new notifications may overwrite data for older notifications in the //content-level NotificationDatabase.

Zijie He

Thank you for the insight (again 😂).

Returning self-incremental integer.

File fuchsia_web/webengine/browser/push_messaging_service_impl.cc
Line 264, Patchset 20: base::FilePath("/tmp"),
Peter Beverloo . resolved

This is a bit of a strange decision - the GCM Driver will store e.g. public/private key pairs in this directory, which in /tmp may become readable (or at least observable) by other users. Is this important?

Zijie He

The file system on fuchsia is significantly different (one of the security features), the /tmp is only visible to the component (chrome in the context), no other components (other applications) can read it.
The reason I am using /tmp here is because the /data/ isn't available in the web_engine_shell which is different than the end user facing web_engine (another fuchsia specific thing).
But yes, it will be addressed soon, the web_engine should use persistent storage for the purpose.

Peter Beverloo . resolved

Please fix this WARNING reported by Code Duplication: Duplicate code found. Review for potential refactoring.
This block matches lines...

Duplicate code found. Review for potential refactoring.
This block matches lines 617-648 in [push_messaging_service_impl.cc](https://source.corp.google.com/h/chromium/chromium/src/+/main:chrome/browser/push_messaging/push_messaging_service_impl.cc;l=617-648;drc=95f912cedcfed49b1360d308897f441882b57f13).

----------------

Was this useful? [Yes 👍](http://go/gerrit-code-duplication-thumbs-up?title=[Yes%20👍]%20https://chromium-review.googlesource.com/c/chromium/src/+/7047169/20) / [No 👎](http://go/gerrit-code-duplication-thumbs-down?title=[No%20👎]%20https://chromium-review.googlesource.com/c/chromium/src/+/7047169/20)
Please provide additional feedback at go/pdeio-code-duplication-bug

Zijie He

I created https://crrev.com/c/7122225 to address it.

Open in Gerrit

Related details

Attention is currently required from:
  • Peter Beverloo
  • Sergey Ulanov
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: If7206ad7d9fe435722a288d3eac6df5f2bdab25f
    Gerrit-Change-Number: 7047169
    Gerrit-PatchSet: 24
    Gerrit-Owner: Zijie He <zij...@google.com>
    Gerrit-Reviewer: Peter Beverloo <pe...@chromium.org>
    Gerrit-Reviewer: Sergey Ulanov <ser...@chromium.org>
    Gerrit-Reviewer: Zijie He <zij...@google.com>
    Gerrit-Attention: Sergey Ulanov <ser...@chromium.org>
    Gerrit-Attention: Peter Beverloo <pe...@chromium.org>
    Gerrit-Comment-Date: Thu, 06 Nov 2025 23:53:00 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Peter Beverloo <pe...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Sergey Ulanov (Gerrit)

    unread,
    Nov 7, 2025, 8:47:48 PM (7 days ago) Nov 7
    to Zijie He, Peter Beverloo, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, dmurph+watching...@chromium.org, edgesto...@microsoft.com, storage...@chromium.org, blink-...@chromium.org, fuchsia...@chromium.org
    Attention needed from Peter Beverloo and Zijie He

    Sergey Ulanov added 6 comments

    File chrome/browser/notifications/platform_notification_service_impl.h
    File fuchsia_web/webengine/browser/push_messaging_service_impl.cc
    Line 221, Patchset 24 (Latest): parent_context_.DeliverPushMessage(
    Sergey Ulanov . unresolved

    How does this work? IIUC push messages are normally delivered to service workers, see https://source.chromium.org/chromium/chromium/src/+/main:content/browser/push_messaging/push_messaging_router.cc;drc=309e7aa9204b3a6d3c0770254499dd0044166550;l=129 .
    So far we didn't support service workers in WebEngine, and I'm not sure we want to support it.

    Line 264, Patchset 24 (Latest): base::FilePath("/tmp"),
    Sergey Ulanov . unresolved

    What is stored there? can we use a different `GCMStore` implementation that keeps all data in memory?

    File fuchsia_web/webengine/browser/web_engine_browser_main_parts.cc
    Line 202, Patchset 24 (Latest): network_connection_tracker_.reset(content::GetNetworkConnectionTracker());
    Sergey Ulanov . unresolved

    `connect::GetNetworkConnectionTracker()` keeps the ownership of the result, so we cannot put it in a `unique_ptr`. So we don't need `network_connection_tracker_` - just call GetNetworkConnectionTracker() when you need it.

    File fuchsia_web/webengine/browser/web_engine_permission_delegate.cc
    Line 58, Patchset 24 (Latest):blink::mojom::PermissionStatus WebEnginePermissionDelegate::GetPermissionStatus(
    Sergey Ulanov . unresolved

    does this function get called for NOTIFICATION permission? Maybe the change in `GetPermissionResultForCurrentDocument` is enough?

    Line 91, Patchset 24 (Latest): // TODO(crbug.com/424479300): This permission needs to be checked against the
    Sergey Ulanov . unresolved

    Please add a comment to make it clear why we need to allow this permission for all frames.
    Would it make sense to add this permission in fuchsia.web API and then allow it only for pages that actually need? (i.e. cast_runner would need to call `SetPermissionState`).

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Peter Beverloo
    • Zijie He
    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: If7206ad7d9fe435722a288d3eac6df5f2bdab25f
      Gerrit-Change-Number: 7047169
      Gerrit-PatchSet: 24
      Gerrit-Owner: Zijie He <zij...@google.com>
      Gerrit-Reviewer: Peter Beverloo <pe...@chromium.org>
      Gerrit-Reviewer: Sergey Ulanov <ser...@chromium.org>
      Gerrit-Reviewer: Zijie He <zij...@google.com>
      Gerrit-Attention: Zijie He <zij...@google.com>
      Gerrit-Attention: Peter Beverloo <pe...@chromium.org>
      Gerrit-Comment-Date: Sat, 08 Nov 2025 01:47:37 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Zijie He (Gerrit)

      unread,
      Nov 8, 2025, 11:26:03 AM (6 days ago) Nov 8
      to Sergey Ulanov, Peter Beverloo, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, dmurph+watching...@chromium.org, edgesto...@microsoft.com, storage...@chromium.org, blink-...@chromium.org, fuchsia...@chromium.org
      Attention needed from Peter Beverloo and Sergey Ulanov

      Zijie He added 5 comments

      Patchset-level comments
      Zijie He . resolved

      Thank you Sergey, I am addressing other comments now, but would like to explain the support of service worker and GCMStore first.

      File chrome/browser/notifications/platform_notification_service_impl.h
      File fuchsia_web/webengine/browser/push_messaging_service_impl.cc
      Line 221, Patchset 24 (Latest): parent_context_.DeliverPushMessage(
      Sergey Ulanov . resolved

      How does this work? IIUC push messages are normally delivered to service workers, see https://source.chromium.org/chromium/chromium/src/+/main:content/browser/push_messaging/push_messaging_router.cc;drc=309e7aa9204b3a6d3c0770254499dd0044166550;l=129 .
      So far we didn't support service workers in WebEngine, and I'm not sure we want to support it.

      Zijie He

      Yes, web engine does support service workers now, and it's used by Google meet 👍

      Line 264, Patchset 24 (Latest): base::FilePath("/tmp"),
      Sergey Ulanov . unresolved

      What is stored there? can we use a different `GCMStore` implementation that keeps all data in memory?

      Zijie He

      I think currently they are key pairs and some other connection related information.
      I do agree this should be optimized, but I left a TODO here for now. We should either persistently store the data, or use some in memory implementation. Not sure if GCMStore supports it yet.

      File fuchsia_web/webengine/browser/web_engine_permission_delegate.cc
      Line 58, Patchset 24 (Latest):blink::mojom::PermissionStatus WebEnginePermissionDelegate::GetPermissionStatus(
      Sergey Ulanov . unresolved

      does this function get called for NOTIFICATION permission? Maybe the change in `GetPermissionResultForCurrentDocument` is enough?

      Zijie He

      Very likely, I may mistakenly forget to remove one of these two. I will confirm it later.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Peter Beverloo
      • Sergey Ulanov
      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: If7206ad7d9fe435722a288d3eac6df5f2bdab25f
      Gerrit-Change-Number: 7047169
      Gerrit-PatchSet: 24
      Gerrit-Owner: Zijie He <zij...@google.com>
      Gerrit-Reviewer: Peter Beverloo <pe...@chromium.org>
      Gerrit-Reviewer: Sergey Ulanov <ser...@chromium.org>
      Gerrit-Reviewer: Zijie He <zij...@google.com>
      Gerrit-Attention: Sergey Ulanov <ser...@chromium.org>
      Gerrit-Attention: Peter Beverloo <pe...@chromium.org>
      Gerrit-Comment-Date: Sat, 08 Nov 2025 16:25:54 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Sergey Ulanov <ser...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Zijie He (Gerrit)

      unread,
      Nov 10, 2025, 5:12:26 PM (4 days ago) Nov 10
      to Sergey Ulanov, Peter Beverloo, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, dmurph+watching...@chromium.org, edgesto...@microsoft.com, storage...@chromium.org, blink-...@chromium.org, fuchsia...@chromium.org
      Attention needed from Peter Beverloo and Sergey Ulanov

      Zijie He voted and added 4 comments

      Votes added by Zijie He

      Commit-Queue+1

      4 comments

      Patchset-level comments
      File-level comment, Patchset 25 (Latest):
      Zijie He . resolved

      Also talked offline with Sergey, I will prepare a document to note the expectation of service worker in web engine.

      File fuchsia_web/webengine/browser/web_engine_browser_main_parts.cc
      Line 202, Patchset 24: network_connection_tracker_.reset(content::GetNetworkConnectionTracker());
      Sergey Ulanov . resolved

      `connect::GetNetworkConnectionTracker()` keeps the ownership of the result, so we cannot put it in a `unique_ptr`. So we don't need `network_connection_tracker_` - just call GetNetworkConnectionTracker() when you need it.

      Zijie He

      Ha, interesting, thank you for pointing it out. Yes, we should use raw_ptr. The functionality of the network_connection_tracker_ is to create the NetworkConnectionTracker in the right thread (UI vs IO).

      File fuchsia_web/webengine/browser/web_engine_permission_delegate.cc
      Line 58, Patchset 24:blink::mojom::PermissionStatus WebEnginePermissionDelegate::GetPermissionStatus(
      Sergey Ulanov . resolved

      does this function get called for NOTIFICATION permission? Maybe the change in `GetPermissionResultForCurrentDocument` is enough?

      Zijie He

      Very likely, I may mistakenly forget to remove one of these two. I will confirm it later.

      Zijie He

      Ah, no, the permission control of service worker uses this function instead.

      On the other hand, very likely the one ForCurrentDocument is not a must-have for service worker use scenarios. But it may break the assumptions of the users, i.e. page does not get the permission, but service worker does.

      Line 91, Patchset 24: // TODO(crbug.com/424479300): This permission needs to be checked against the
      Sergey Ulanov . resolved

      Please add a comment to make it clear why we need to allow this permission for all frames.
      Would it make sense to add this permission in fuchsia.web API and then allow it only for pages that actually need? (i.e. cast_runner would need to call `SetPermissionState`).

      Zijie He

      Added comments.

      It's very unlikely a cast_runner would need to use the push messaging api or notification, but only UC meet. Though UC meet is also a cast app, we may wanna allow only a managed set of origins like the list in push_messaging_service_impl.cc/IsPermissionGranted.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Peter Beverloo
      • Sergey Ulanov
      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: If7206ad7d9fe435722a288d3eac6df5f2bdab25f
      Gerrit-Change-Number: 7047169
      Gerrit-PatchSet: 25
      Gerrit-Owner: Zijie He <zij...@google.com>
      Gerrit-Reviewer: Peter Beverloo <pe...@chromium.org>
      Gerrit-Reviewer: Sergey Ulanov <ser...@chromium.org>
      Gerrit-Reviewer: Zijie He <zij...@google.com>
      Gerrit-Attention: Sergey Ulanov <ser...@chromium.org>
      Gerrit-Attention: Peter Beverloo <pe...@chromium.org>
      Gerrit-Comment-Date: Mon, 10 Nov 2025 22:12:15 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Sergey Ulanov <ser...@chromium.org>
      Comment-In-Reply-To: Zijie He <zij...@google.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Sergey Ulanov (Gerrit)

      unread,
      5:45 PM (5 hours ago) 5:45 PM
      to Zijie He, Code Review Nudger, Peter Beverloo, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, dmurph+watching...@chromium.org, edgesto...@microsoft.com, storage...@chromium.org, blink-...@chromium.org, fuchsia...@chromium.org
      Attention needed from Peter Beverloo and Zijie He

      Sergey Ulanov added 1 comment

      File fuchsia_web/webengine/browser/web_engine_browser_main_parts.cc
      Line 202, Patchset 24: network_connection_tracker_.reset(content::GetNetworkConnectionTracker());
      Sergey Ulanov . unresolved

      `connect::GetNetworkConnectionTracker()` keeps the ownership of the result, so we cannot put it in a `unique_ptr`. So we don't need `network_connection_tracker_` - just call GetNetworkConnectionTracker() when you need it.

      Zijie He

      Ha, interesting, thank you for pointing it out. Yes, we should use raw_ptr. The functionality of the network_connection_tracker_ is to create the NetworkConnectionTracker in the right thread (UI vs IO).

      Sergey Ulanov

      I believe `HandleContextRequest` should be called on the main/UI thread, so it should be safe to call GetNetworkConnectionTracker() there - does that not work?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Peter Beverloo
      • Zijie He
      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: If7206ad7d9fe435722a288d3eac6df5f2bdab25f
      Gerrit-Change-Number: 7047169
      Gerrit-PatchSet: 25
      Gerrit-Owner: Zijie He <zij...@google.com>
      Gerrit-Reviewer: Peter Beverloo <pe...@chromium.org>
      Gerrit-Reviewer: Sergey Ulanov <ser...@chromium.org>
      Gerrit-Reviewer: Zijie He <zij...@google.com>
      Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
      Gerrit-Attention: Zijie He <zij...@google.com>
      Gerrit-Attention: Peter Beverloo <pe...@chromium.org>
      Gerrit-Comment-Date: Fri, 14 Nov 2025 22:45:40 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Zijie He (Gerrit)

      unread,
      6:10 PM (5 hours ago) 6:10 PM
      to Code Review Nudger, Sergey Ulanov, Peter Beverloo, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, dmurph+watching...@chromium.org, edgesto...@microsoft.com, storage...@chromium.org, blink-...@chromium.org, fuchsia...@chromium.org
      Attention needed from Sergey Ulanov

      Zijie He added 1 comment

      File fuchsia_web/webengine/browser/web_engine_browser_main_parts.cc
      Line 202, Patchset 24: network_connection_tracker_.reset(content::GetNetworkConnectionTracker());
      Sergey Ulanov . unresolved

      `connect::GetNetworkConnectionTracker()` keeps the ownership of the result, so we cannot put it in a `unique_ptr`. So we don't need `network_connection_tracker_` - just call GetNetworkConnectionTracker() when you need it.

      Zijie He

      Ha, interesting, thank you for pointing it out. Yes, we should use raw_ptr. The functionality of the network_connection_tracker_ is to create the NetworkConnectionTracker in the right thread (UI vs IO).

      Sergey Ulanov

      I believe `HandleContextRequest` should be called on the main/UI thread, so it should be safe to call GetNetworkConnectionTracker() there - does that not work?

      Zijie He

      Nope, it shows running on IO thread 😞

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Sergey Ulanov
      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: If7206ad7d9fe435722a288d3eac6df5f2bdab25f
      Gerrit-Change-Number: 7047169
      Gerrit-PatchSet: 25
      Gerrit-Owner: Zijie He <zij...@google.com>
      Gerrit-Reviewer: Peter Beverloo <pe...@chromium.org>
      Gerrit-Reviewer: Sergey Ulanov <ser...@chromium.org>
      Gerrit-Reviewer: Zijie He <zij...@google.com>
      Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
      Gerrit-Attention: Sergey Ulanov <ser...@chromium.org>
      Gerrit-Comment-Date: Fri, 14 Nov 2025 23:10:23 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages