Skip to content

Prune fenced frame and Private state tokens#11509

Open
linxinan-yt wants to merge 3 commits into
youtube:mainfrom
linxinan-yt:ps-continue
Open

Prune fenced frame and Private state tokens#11509
linxinan-yt wants to merge 3 commits into
youtube:mainfrom
linxinan-yt:ps-continue

Conversation

@linxinan-yt

Copy link
Copy Markdown
Member

Bug: 505811196

@github-actions

Copy link
Copy Markdown
Contributor

🤖 Gemini Suggested Commit Message


build: Prune fenced frames and state tokens

Exclude Fenced Frames and Private State Tokens (formerly Trust
Tokens) from the build. These Privacy Sandbox features are not
supported or required by Cobalt, and removing them helps reduce
binary size and complexity.

Bug: 505811196

💡 Pro Tips for a Better Commit Message:

  1. Influence the Result: Want to change the output? You can write custom prompts or instructions directly in the Pull Request description. The model uses that text to generate the message.
  2. Re-run the Generator: Post a comment with: /generate-commit-message

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds fenced frame sources to the browser build configuration and conditionally gates the trust tokens dependency in the network service under the enable_privacy_sandbox_apis flag. However, gating the dependency without also conditionally gating the corresponding source files that use trust tokens will lead to compilation or linker errors when the flag is disabled. Additionally, ensure that the enable_privacy_sandbox_apis build variable is properly imported in services/network/BUILD.gn to prevent GN build failures.

Comment thread services/network/BUILD.gn
Comment on lines +369 to +371
if (enable_privacy_sandbox_apis) {
deps += [ "//services/network/trust_tokens" ]
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Gating //services/network/trust_tokens in deps without conditionally gating the source files in services/network (e.g., network_context.cc, network_service.cc) that depend on trust tokens will lead to compilation or linker errors when enable_privacy_sandbox_apis is false. The corresponding source files and preprocessor guards must be updated to handle the conditional exclusion of trust_tokens.

References
  1. Surgical Feature Gating guidelines require following the guidelines and checking the PR audit checklist in Surgical Feature Gating Rules when gating features or targets to optimize binary size. (link)

Comment thread services/network/BUILD.gn
Comment on lines +369 to +371
if (enable_privacy_sandbox_apis) {
deps += [ "//services/network/trust_tokens" ]
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

If enable_privacy_sandbox_apis is not imported in this file, the GN build will fail with an 'unknown variable' error. Add the appropriate import statement (e.g., import("//cobalt/build/config/features.gni") or the relevant .gni file) at the top of services/network/BUILD.gn if it is not already present.

References
  1. Surgical Feature Gating guidelines require following the guidelines and checking the PR audit checklist in Surgical Feature Gating Rules when gating features or targets to optimize binary size. (link)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant