Safe Browsing flag in chromium

414 views
Skip to first unread message

Dudi Patimer

unread,
Nov 13, 2023, 9:20:20 AM11/13/23
to Chromium-dev
Hi,

I'm trying to configure safe-browsing using the command line argument -safebrowsing-enable-enhanced-protection when running chroimum in headless-mode (new), but it seems safe browsing doesn't take affect.

Is this is a know issue?

Thanks,
David

Daniel Rubery

unread,
Nov 14, 2023, 6:02:51 PM11/14/23
to Chromium-dev, Dudi Patimer
I don't think Safe Browsing code is compiled into headless mode, so unfortunately testing Safe Browsing in headless is not possible.

Mathias Bynens

unread,
Nov 22, 2023, 4:50:14 AM11/22/23
to dru...@google.com, Chromium-dev, Dudi Patimer, Peter Kvitek
Daniel, this is true for the old Headless (//headless) but I believe the new Headless (--headless=new) should generally match headful Chrome. Peter, do you have any insights here?

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/fd4dad43-9312-4fbb-aba4-eed00af556cbn%40chromium.org.

Peter Kvitek

unread,
Nov 23, 2023, 8:54:19 AM11/23/23
to Mathias Bynens, dru...@google.com, Chromium-dev, Dudi Patimer
Confirming what Mathias said. Safe Browsing was not available in old headless mode, however, new headless mode which is essentially the actual Chrome running with no visible mode is expected to fully support it.

Best,
Peter

Dudi Patimer

unread,
Nov 27, 2023, 8:16:39 AM11/27/23
to Peter Kvitek, Mathias Bynens, dru...@google.com, Chromium-dev
I've tested both headless=new and headless=false modes, but it seems safe browsing is not included.
Is there a repository that includes safe browsing in the compiled artifact?

Peter Kvitek

unread,
Nov 27, 2023, 4:21:31 PM11/27/23
to Dudi Patimer, Mathias Bynens, dru...@google.com, Chromium-dev
New headless is the regular headful Chrome, so it should include everything regular Chrome includes.  Please try your tests with regular Chrome and if they work with it but fail with --headless-new share the repro script.

/Peter

Dudi Patimer

unread,
Nov 29, 2023, 8:30:16 AM11/29/23
to Peter Kvitek, Mathias Bynens, dru...@google.com, Chromium-dev
I've tested according to Peter suggestion and although safebrowsing feature is working in my regular Chrome installation, it seems to not take effect when I run Chrome from the command line (both in headless/headful).
After trying with different arguments, it seems that when --user-data-dir argument is being added (with tmp folder) to the command it causes safe browsing to be disabled.

What could be the relation between the data-dir and safe-browsing?

Dudi Patimer

unread,
Nov 30, 2023, 7:49:24 AM11/30/23
to Daniel Rubery, Peter Kvitek, Mathias Bynens, Chromium-dev
This is indeed the issue, I've tested Safe-Browsing using a known phishing URL right after starting chromium. When waiting for ~2-3 after startup the Safe-Browsing page appears.
So it's working for the new headless.

Thanks for your help!

On Wed, Nov 29, 2023 at 7:27 PM Daniel Rubery <dru...@google.com> wrote:
How exactly are you testing whether Safe Browsing is enabled? Safe Browsing stores its lists of bad URL hashes in the user data directory. Changing user-data-dir will require you to download new hash lists, which can take a few minutes after startup.

Peter Kvitek

unread,
Nov 30, 2023, 3:38:44 PM11/30/23
to Dudi Patimer, Daniel Rubery, Mathias Bynens, Chromium-dev
Great! Thank you for getting to the bottom of it.

I'll investigate what other Chrome features are this king of lazy initialization.

/Peter 

Daniel Rubery

unread,
Nov 30, 2023, 3:38:52 PM11/30/23
to Dudi Patimer, Peter Kvitek, Mathias Bynens, Chromium-dev
How exactly are you testing whether Safe Browsing is enabled? Safe Browsing stores its lists of bad URL hashes in the user data directory. Changing user-data-dir will require you to download new hash lists, which can take a few minutes after startup.

Reply all
Reply to author
Forward
0 new messages