WebUI: Leverage the new WebUIDataSourceImpl#SetDefaultResource(). [chromium/src : main]

1 view
Skip to first unread message

Demetrios Papadopoulos (Gerrit)

unread,
Jan 22, 2026, 1:56:40 PMJan 22
to Rebekah Potter, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, feature-v...@chromium.org, dmurph+wa...@chromium.org, druber...@chromium.org, enne...@chromium.org, jonmann+w...@chromium.org, michaelcheco+...@google.com, weiluanw...@google.com, ajayramamurt...@google.com, nwoked...@chromium.org, byronle...@chromium.org, zackha...@chromium.org, wfh+...@chromium.org, xinghui...@chromium.org, rginda...@chromium.org, trewin...@google.com, storage...@chromium.org, tracing...@chromium.org, chungshe...@google.com, andysjl...@chromium.org, crisrael+...@google.com, jatapiaro+wat...@google.com, jackshira+...@google.com, edgesto...@microsoft.com, spang...@chromium.org, menghua...@google.com, vakh+safe_br...@chromium.org, dennyh...@google.com, lwinston+watc...@google.com, filesapp...@chromium.org, jimmyxgong+w...@chromium.org, pushi+wa...@google.com, rrsilva+wat...@google.com, croissant-...@chromium.org
Attention needed from Rebekah Potter

Demetrios Papadopoulos voted and added 1 comment

Votes added by Demetrios Papadopoulos

Commit-Queue+1

1 comment

Patchset-level comments
File-level comment, Patchset 4 (Latest):
Demetrios Papadopoulos . unresolved

PTAL. WDYT?

I am also wondering if we should rename `SeDefaultResource()` to `SetRootResource()` for more clarity. Although this would create quite some churn,I think the name would be less confusing and more disassociated with the current name.

Open in Gerrit

Related details

Attention is currently required from:
  • Rebekah Potter
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ia6069607b9dae9d6117fe313932c03c96d47d472
Gerrit-Change-Number: 7414309
Gerrit-PatchSet: 4
Gerrit-Owner: Demetrios Papadopoulos <dpa...@chromium.org>
Gerrit-Reviewer: Demetrios Papadopoulos <dpa...@chromium.org>
Gerrit-Reviewer: Rebekah Potter <rbpo...@chromium.org>
Gerrit-Attention: Rebekah Potter <rbpo...@chromium.org>
Gerrit-Comment-Date: Thu, 22 Jan 2026 18:56:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Rebekah Potter (Gerrit)

unread,
Jan 22, 2026, 4:14:45 PMJan 22
to Demetrios Papadopoulos, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, feature-v...@chromium.org, dmurph+wa...@chromium.org, druber...@chromium.org, enne...@chromium.org, jonmann+w...@chromium.org, michaelcheco+...@google.com, weiluanw...@google.com, ajayramamurt...@google.com, nwoked...@chromium.org, byronle...@chromium.org, zackha...@chromium.org, wfh+...@chromium.org, xinghui...@chromium.org, rginda...@chromium.org, trewin...@google.com, storage...@chromium.org, tracing...@chromium.org, chungshe...@google.com, andysjl...@chromium.org, crisrael+...@google.com, jatapiaro+wat...@google.com, jackshira+...@google.com, edgesto...@microsoft.com, spang...@chromium.org, menghua...@google.com, vakh+safe_br...@chromium.org, dennyh...@google.com, lwinston+watc...@google.com, filesapp...@chromium.org, jimmyxgong+w...@chromium.org, pushi+wa...@google.com, rrsilva+wat...@google.com, croissant-...@chromium.org
Attention needed from Demetrios Papadopoulos

Rebekah Potter added 3 comments

Patchset-level comments
Demetrios Papadopoulos . unresolved

PTAL. WDYT?

I am also wondering if we should rename `SeDefaultResource()` to `SetRootResource()` for more clarity. Although this would create quite some churn,I think the name would be less confusing and more disassociated with the current name.

Rebekah Potter

I was going to say that this change could be a bit confusing, because we've been calling `SetDefaultResource()` deprecated/discouraging it in reviews for so long. Renaming SGTM although I agree it will create quite a lot of churn.

File ash/webui/print_preview_cros/print_preview_cros_ui.cc
Line 41, Patchset 4 (Latest): source->SetDefaultResource(default_resource);
Rebekah Potter . unresolved

Remove duplicate call?

File ash/webui/scanner_feedback_ui/scanner_feedback_untrusted_ui.cc
Line 177, Patchset 4 (Latest): // We intentionally do not use `SetDefaultResource` here as we do not want to
// serve index.html for non-HTML paths.
Rebekah Potter . unresolved

Comment needs to be updated.

Open in Gerrit

Related details

Attention is currently required from:
  • Demetrios Papadopoulos
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ia6069607b9dae9d6117fe313932c03c96d47d472
Gerrit-Change-Number: 7414309
Gerrit-PatchSet: 4
Gerrit-Owner: Demetrios Papadopoulos <dpa...@chromium.org>
Gerrit-Reviewer: Demetrios Papadopoulos <dpa...@chromium.org>
Gerrit-Reviewer: Rebekah Potter <rbpo...@chromium.org>
Gerrit-Attention: Demetrios Papadopoulos <dpa...@chromium.org>
Gerrit-Comment-Date: Thu, 22 Jan 2026 21:14:36 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Demetrios Papadopoulos <dpa...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Demetrios Papadopoulos (Gerrit)

unread,
Jan 22, 2026, 5:26:10 PMJan 22
to Rebekah Potter, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, feature-v...@chromium.org, dmurph+wa...@chromium.org, druber...@chromium.org, enne...@chromium.org, jonmann+w...@chromium.org, michaelcheco+...@google.com, weiluanw...@google.com, ajayramamurt...@google.com, nwoked...@chromium.org, byronle...@chromium.org, zackha...@chromium.org, wfh+...@chromium.org, xinghui...@chromium.org, rginda...@chromium.org, trewin...@google.com, storage...@chromium.org, tracing...@chromium.org, chungshe...@google.com, andysjl...@chromium.org, crisrael+...@google.com, jatapiaro+wat...@google.com, jackshira+...@google.com, edgesto...@microsoft.com, spang...@chromium.org, menghua...@google.com, vakh+safe_br...@chromium.org, dennyh...@google.com, lwinston+watc...@google.com, filesapp...@chromium.org, jimmyxgong+w...@chromium.org, pushi+wa...@google.com, rrsilva+wat...@google.com, croissant-...@chromium.org
Attention needed from Rebekah Potter

Demetrios Papadopoulos added 4 comments

Patchset-level comments
Demetrios Papadopoulos . unresolved

PTAL. WDYT?

I am also wondering if we should rename `SeDefaultResource()` to `SetRootResource()` for more clarity. Although this would create quite some churn,I think the name would be less confusing and more disassociated with the current name.

Rebekah Potter

I was going to say that this change could be a bit confusing, because we've been calling `SetDefaultResource()` deprecated/discouraging it in reviews for so long. Renaming SGTM although I agree it will create quite a lot of churn.

Demetrios Papadopoulos

I was going to say that this change could be a bit confusing, because we've been calling SetDefaultResource() deprecated/discouraging it in reviews for so long.

What is the alternative though? We could try to completely eliminate it and replace all usages in the other direciton (Replace `SetDefaultResource()` -> `AddResourcePath("", ...)`). My initial thinking was that this might be a harder API to get right than still providing a dedicated method to do this.

File-level comment, Patchset 6 (Latest):
Demetrios Papadopoulos . resolved

I removed all the files that are not owned by ui/webui/PLATFORM_OWNERS from this CL, and will address in follow-ups, to make it easier to land as it would require too many reviewers. Planning to actually send CLs to update the ownership to make it easier for the WebUI team to perform these horizontal changes.

PTAL as the +1 was invalidated.

File ash/webui/print_preview_cros/print_preview_cros_ui.cc
Line 41, Patchset 4: source->SetDefaultResource(default_resource);
Rebekah Potter . resolved

Remove duplicate call?

Demetrios Papadopoulos

Done

File ash/webui/scanner_feedback_ui/scanner_feedback_untrusted_ui.cc
Line 177, Patchset 4: // We intentionally do not use `SetDefaultResource` here as we do not want to

// serve index.html for non-HTML paths.
Rebekah Potter . resolved

Comment needs to be updated.

Demetrios Papadopoulos

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Rebekah Potter
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: Ia6069607b9dae9d6117fe313932c03c96d47d472
Gerrit-Change-Number: 7414309
Gerrit-PatchSet: 6
Gerrit-Owner: Demetrios Papadopoulos <dpa...@chromium.org>
Gerrit-Reviewer: Demetrios Papadopoulos <dpa...@chromium.org>
Gerrit-Reviewer: Rebekah Potter <rbpo...@chromium.org>
Gerrit-Attention: Rebekah Potter <rbpo...@chromium.org>
Gerrit-Comment-Date: Thu, 22 Jan 2026 22:26:00 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Demetrios Papadopoulos <dpa...@chromium.org>
Comment-In-Reply-To: Rebekah Potter <rbpo...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Rebekah Potter (Gerrit)

unread,
Jan 22, 2026, 6:40:24 PMJan 22
to Demetrios Papadopoulos, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, feature-v...@chromium.org, dmurph+wa...@chromium.org, druber...@chromium.org, enne...@chromium.org, jonmann+w...@chromium.org, michaelcheco+...@google.com, weiluanw...@google.com, ajayramamurt...@google.com, nwoked...@chromium.org, byronle...@chromium.org, zackha...@chromium.org, wfh+...@chromium.org, xinghui...@chromium.org, rginda...@chromium.org, trewin...@google.com, storage...@chromium.org, tracing...@chromium.org, chungshe...@google.com, andysjl...@chromium.org, crisrael+...@google.com, jatapiaro+wat...@google.com, jackshira+...@google.com, edgesto...@microsoft.com, spang...@chromium.org, menghua...@google.com, vakh+safe_br...@chromium.org, dennyh...@google.com, lwinston+watc...@google.com, filesapp...@chromium.org, jimmyxgong+w...@chromium.org, pushi+wa...@google.com, rrsilva+wat...@google.com, croissant-...@chromium.org
Attention needed from Demetrios Papadopoulos

Rebekah Potter voted and added 1 comment

Votes added by Rebekah Potter

Code-Review+1

1 comment

Patchset-level comments
File-level comment, Patchset 4:
Demetrios Papadopoulos . resolved

PTAL. WDYT?

I am also wondering if we should rename `SeDefaultResource()` to `SetRootResource()` for more clarity. Although this would create quite some churn,I think the name would be less confusing and more disassociated with the current name.

Rebekah Potter

I was going to say that this change could be a bit confusing, because we've been calling `SetDefaultResource()` deprecated/discouraging it in reviews for so long. Renaming SGTM although I agree it will create quite a lot of churn.

Demetrios Papadopoulos

I was going to say that this change could be a bit confusing, because we've been calling SetDefaultResource() deprecated/discouraging it in reviews for so long.

What is the alternative though? We could try to completely eliminate it and replace all usages in the other direciton (Replace `SetDefaultResource()` -> `AddResourcePath("", ...)`). My initial thinking was that this might be a harder API to get right than still providing a dedicated method to do this.

Rebekah Potter

I think the renaming would be the alternative (or something we could do in addition). My comment was supporting the renaming, not saying we shouldn't land this CL.

Replacing the other direction would be less confusing (previously deprecated method -> non deprecated method), but I agree the API is more awkward that way.

Open in Gerrit

Related details

Attention is currently required from:
  • Demetrios Papadopoulos
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ia6069607b9dae9d6117fe313932c03c96d47d472
    Gerrit-Change-Number: 7414309
    Gerrit-PatchSet: 6
    Gerrit-Owner: Demetrios Papadopoulos <dpa...@chromium.org>
    Gerrit-Reviewer: Demetrios Papadopoulos <dpa...@chromium.org>
    Gerrit-Reviewer: Rebekah Potter <rbpo...@chromium.org>
    Gerrit-Attention: Demetrios Papadopoulos <dpa...@chromium.org>
    Gerrit-Comment-Date: Thu, 22 Jan 2026 23:40:11 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Demetrios Papadopoulos (Gerrit)

    unread,
    Jan 22, 2026, 6:55:31 PMJan 22
    to Rebekah Potter, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, feature-v...@chromium.org, dmurph+wa...@chromium.org, druber...@chromium.org, enne...@chromium.org, jonmann+w...@chromium.org, michaelcheco+...@google.com, weiluanw...@google.com, ajayramamurt...@google.com, nwoked...@chromium.org, byronle...@chromium.org, zackha...@chromium.org, wfh+...@chromium.org, xinghui...@chromium.org, rginda...@chromium.org, trewin...@google.com, storage...@chromium.org, tracing...@chromium.org, chungshe...@google.com, andysjl...@chromium.org, crisrael+...@google.com, jatapiaro+wat...@google.com, jackshira+...@google.com, edgesto...@microsoft.com, spang...@chromium.org, menghua...@google.com, vakh+safe_br...@chromium.org, dennyh...@google.com, lwinston+watc...@google.com, filesapp...@chromium.org, jimmyxgong+w...@chromium.org, pushi+wa...@google.com, rrsilva+wat...@google.com, croissant-...@chromium.org

    Demetrios Papadopoulos voted and added 1 comment

    Votes added by Demetrios Papadopoulos

    Commit-Queue+2

    1 comment

    Patchset-level comments
    Demetrios Papadopoulos . resolved

    PTAL. WDYT?

    I am also wondering if we should rename `SeDefaultResource()` to `SetRootResource()` for more clarity. Although this would create quite some churn,I think the name would be less confusing and more disassociated with the current name.

    Rebekah Potter

    I was going to say that this change could be a bit confusing, because we've been calling `SetDefaultResource()` deprecated/discouraging it in reviews for so long. Renaming SGTM although I agree it will create quite a lot of churn.

    Demetrios Papadopoulos

    I was going to say that this change could be a bit confusing, because we've been calling SetDefaultResource() deprecated/discouraging it in reviews for so long.

    What is the alternative though? We could try to completely eliminate it and replace all usages in the other direciton (Replace `SetDefaultResource()` -> `AddResourcePath("", ...)`). My initial thinking was that this might be a harder API to get right than still providing a dedicated method to do this.

    Rebekah Potter

    I think the renaming would be the alternative (or something we could do in addition). My comment was supporting the renaming, not saying we shouldn't land this CL.

    Replacing the other direction would be less confusing (previously deprecated method -> non deprecated method), but I agree the API is more awkward that way.

    Demetrios Papadopoulos

    SG. I'll follow-up with the ranaming and using it as an opportunity to update the OWNERShip of any files that are not already owned by ui/webui/PLATFORM_OWNERRS.

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ia6069607b9dae9d6117fe313932c03c96d47d472
    Gerrit-Change-Number: 7414309
    Gerrit-PatchSet: 6
    Gerrit-Owner: Demetrios Papadopoulos <dpa...@chromium.org>
    Gerrit-Reviewer: Demetrios Papadopoulos <dpa...@chromium.org>
    Gerrit-Reviewer: Rebekah Potter <rbpo...@chromium.org>
    Gerrit-Comment-Date: Thu, 22 Jan 2026 23:55:21 +0000
    satisfied_requirement
    open
    diffy

    Chromium LUCI CQ (Gerrit)

    unread,
    Jan 22, 2026, 7:26:46 PMJan 22
    to Demetrios Papadopoulos, Rebekah Potter, AyeAye, chromium...@chromium.org, feature-v...@chromium.org, dmurph+wa...@chromium.org, druber...@chromium.org, enne...@chromium.org, jonmann+w...@chromium.org, michaelcheco+...@google.com, weiluanw...@google.com, ajayramamurt...@google.com, nwoked...@chromium.org, byronle...@chromium.org, zackha...@chromium.org, wfh+...@chromium.org, xinghui...@chromium.org, rginda...@chromium.org, trewin...@google.com, storage...@chromium.org, tracing...@chromium.org, chungshe...@google.com, andysjl...@chromium.org, crisrael+...@google.com, jatapiaro+wat...@google.com, jackshira+...@google.com, edgesto...@microsoft.com, spang...@chromium.org, menghua...@google.com, vakh+safe_br...@chromium.org, dennyh...@google.com, lwinston+watc...@google.com, filesapp...@chromium.org, jimmyxgong+w...@chromium.org, pushi+wa...@google.com, rrsilva+wat...@google.com, croissant-...@chromium.org

    Chromium LUCI CQ submitted the change

    Change information

    Commit message:
    WebUI: Leverage the new WebUIDataSourceImpl#SetDefaultResource().

    SetDefaultResource() semantics were recently changed and it can now be
    deployed in all places that were previously intentionally bypassing it,
    meaning places that were calling `source->AddResourcePath("", ...)`
    Bug: 415304334
    Change-Id: Ia6069607b9dae9d6117fe313932c03c96d47d472
    Commit-Queue: Demetrios Papadopoulos <dpa...@chromium.org>
    Reviewed-by: Rebekah Potter <rbpo...@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1573387}
    Files:
    • M ash/webui/annotator/untrusted_annotator_ui.cc
    • M ash/webui/boca_receiver_app_ui/boca_receiver_ui.cc
    • M ash/webui/boca_receiver_app_ui/boca_receiver_untrusted_ui.cc
    • M ash/webui/boca_ui/boca_ui.cc
    • M ash/webui/color_internals/color_internals_ui.cc
    • M ash/webui/diagnostics_ui/diagnostics_ui.cc
    • M ash/webui/eche_app_ui/eche_app_ui.cc
    • M ash/webui/file_manager/file_manager_ui.cc
    • M ash/webui/files_internals/files_internals_ui.cc
    • M ash/webui/focus_mode/focus_mode_ui.cc
    • M ash/webui/growth_internals/growth_internals_ui.cc
    • M ash/webui/personalization_app/personalization_app_ui.cc
    • M ash/webui/print_preview_cros/print_preview_cros_ui.cc
    • M ash/webui/projector_app/untrusted_projector_ui.cc
    • M ash/webui/recorder_app_ui/recorder_app_ui.cc
    • M ash/webui/sample_system_web_app_ui/sample_system_web_app_ui.cc
    • M ash/webui/sanitize_ui/sanitize_ui.cc
    • M ash/webui/scanner_feedback_ui/scanner_feedback_untrusted_ui.cc
    • M ash/webui/shimless_rma/shimless_rma.cc
    • M ash/webui/status_area_internals/status_area_internals_ui.cc
    • M ash/webui/vc_background_ui/vc_background_ui.cc
    • M chrome/browser/ui/webui/ash/sys_internals/sys_internals_ui.cc
    • M chrome/browser/ui/webui/download_internals/download_internals_ui.cc
    • M chrome/browser/ui/webui/side_panel/read_anything/read_anything_untrusted_ui.cc
    • M chrome/browser/ui/webui/user_actions/user_actions_ui.cc
    • M chrome/browser/ui/webui/version/version_ui.cc
    • M content/browser/webui/web_ui_data_source_unittest.cc
    • M content/browser/webui/web_ui_mojo_browsertest.cc
    • M content/browser/webui/web_ui_mojo_conformance_browsertest.cc
    • M docs/webui/webui_explainer.md
    • M ui/webui/examples/browser/ui/web/webui.cc
    • M ui/webui/webui_util.cc
    Change size: M
    Delta: 32 files changed, 33 insertions(+), 37 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by Rebekah Potter
    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: Ia6069607b9dae9d6117fe313932c03c96d47d472
    Gerrit-Change-Number: 7414309
    Gerrit-PatchSet: 7
    Gerrit-Owner: Demetrios Papadopoulos <dpa...@chromium.org>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: Demetrios Papadopoulos <dpa...@chromium.org>
    Gerrit-Reviewer: Rebekah Potter <rbpo...@chromium.org>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages