Hardcoding google.com in content/

2 views
Skip to first unread message

Christian Biesinger

unread,
Nov 26, 2025, 2:25:49 PMNov 26
to content-owners, Sam Goto, Yi Gu
Hello content owners,

We are working on a feature (still off-by-default behind a flag) where we would like to hardcode a Google URL:

The justification is in the commit message but basically we want to look up a DNS TXT record and the best way to do this reliably is through an HTTP request to a DNS resolver like Google.

Is there a policy for/against doing this in content/? Conceivably, some embedders would prefer not to use Google for this. There *are* other resolvers (like https://developers.cloudflare.com/1.1.1.1/encryption/dns-over-https/make-api-requests/dns-json/, not sure if the API is exactly the same).

Open to any thoughts on this or other options you may have!

Thanks,
Christian

Dave Tapuska

unread,
Nov 26, 2025, 2:58:13 PMNov 26
to Christian Biesinger, content-owners, Sam Goto, Yi Gu
I don't believe we have a policy against that. Some embedders would not prefer to use Google, that is correct. If you have an easy way for them to disable this (maybe via a gn arg flag) then I don't see an issue.  I presume you'd want this enabled for non-official chromium builds (as I was alternatively thinking you could tie it to chrome branded). Happy to hear other opinions.

dave.

--
You received this message because you are subscribed to the Google Groups "content-owners" group.
To unsubscribe from this group and stop receiving emails from it, send an email to content-owner...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/content-owners/CAPTJ0XGBfn24z%2BEfsGNawW7cOb5JL_E5D2pPpRgS%2BiSSfVDcTw%40mail.gmail.com.

Will Harris

unread,
Nov 26, 2025, 4:04:25 PMNov 26
to Dave Tapuska, Christian Biesinger, content-owners, Sam Goto, Yi Gu
It does seems somewhat unusual to have GOOGLE_CHROME_BRANDING in content although it's not unprecedented. I think an alternative option might be to add a new interface in the content browser client that does this, and move the code to //chrome

Will

Dave Tapuska

unread,
Nov 26, 2025, 4:09:00 PMNov 26
to Will Harris, Christian Biesinger, content-owners, Sam Goto, Yi Gu
I think the thing is that the result returned from the URL isn't in a standard format...and is specific to Google...

Will Harris

unread,
Nov 26, 2025, 4:12:38 PMNov 26
to Dave Tapuska, Christian Biesinger, content-owners, Sam Goto, Yi Gu
Well we have lots of stuff specific to Google in //chrome e.g. Google-only APIs, so it seems to be a better place to put it if possible, perhaps via a delegate or a simple API punched through content browser client.

But this is just another 2c, it would be up to content owners to decide, I just lurk :)

Will

Nasko Oskov

unread,
Nov 26, 2025, 5:23:45 PMNov 26
to Will Harris, Dave Tapuska, Christian Biesinger, content-owners, Sam Goto, Yi Gu
I agree with Will that even though there might be some precedent of Google specific code in //content/, we should avoid it as the spirit of //content/ is that it implements the web platform, which is interoperable and not Google specific. Adding a ContentBrowserClient API to get the URL is a fine approach to take.

Christian Biesinger

unread,
Nov 28, 2025, 8:55:21 PMNov 28
to Nasko Oskov, Will Harris, Dave Tapuska, content-owners, Sam Goto, Yi Gu
Thanks everyone, sounds like the best way to handle this is to add a function on ContentBrowserClient to get the URL, so I'll go ahead and do that.

Christian
Reply all
Reply to author
Forward
0 new messages