Digital regulatory labels for unibuild products |
|||||
Issue descriptionChrome on Chrome OS can display a regulatory e-label in the chrome://help (About) page. We currently have labels for samus, eve and nocturne. OEMs like Asus would also like to use e-labels. For boards that map to a single product, this is fine. Just add the PNG and text files to the board's overlay, for each desired region, following the nocturne example. For unibuilds, where the same overlay (e.g. scarlet) ships on multiple devices from different OEMs, this method doesn't work. A proposal is to include all the labels for a given overlay, then use chromeos-config to determine which labels to use. Per derat@: > a) install all of the labels needed by the sibling devices via their board overlay > b) update session_manager to use chromeos-config to determine which label to use at runtime > c) pass that information (e.g. the image's path) to Chrome via a command-line flag > If you want to see some existing code to pattern it after, look at the CrosConfigInterface-related stuff in https://chromium.googlesource.com/chromiumos/platform2/+/master/login_manager/chrome_setup.cc that's already being used to select the wallpaper and determine the power button's physical position.
,
Jan 15
I don't think this needs RVG. Making public.
,
Jan 15
I will work on this bug with some guidance from Charles
,
Jan 15
here's an example for how wallpaper solves a similar problem: platform2/login_manager/chrome_setup.cc schema: wallpaper attribute in cros_config_schema.yaml actual binary payloads: chromeos-assets/wallpaper
,
Jan 15
I'll give it a try.
,
Jan 16
This issue is harder to solve than wallpaper. Because: (1) At build time, we don't know which model the image is for. So we have to install the regulatory labels for all models into the image, (/usr/share/chromeos-assets/regulatory_labels/*). (2) At runtime, we determine which model it is and then pass the correct image/text path for regulatory labels to Chrome via a command-line flag. However, there is no existing flag for regulatory label. So: If we want to add a flag to chromeos_switches, we need to fix both internal/external Chrome. It's probably easier to work with a Chrome SWE? Or is there an easier way to avoid the need of modifying Chrome code?
,
Jan 16
Unless I'm missing something, this scenario is exactly the same as the one for wallpaper (apart from the fact that Chrome already had wallpaper flags when unibuild support was added). A Chrome change will likely be needed here in any case if there's no flag yet.
,
Jan 16
Is a flag really the best way to do this? If so, it doesn't need to be the full path -- just the directory name for the model. What do model names look like?
,
Jan 16
> Is a flag really the best way to do this? Is there another approach? All I can think of is making Chrome link against the chromeos-config library so it can get the model name itself. That's probably possible, but I'm not sure how much work it'll be, and it may make it harder to test this code (either manually or in an automated fashion).
,
Jan 16
(6 days ago)
we already expose customization id value to chrome. i'd vote on following this value versus introducing anything new. this is what drives default apps for unified builds.
,
Jan 16
(6 days ago)
Charles, could you point me to the code where we expose model name to Chrome?
,
Jan 17
(6 days ago)
Oh, I see how per-model default app is supported. We Chrome code always checks '/var/cache/arc_default_apps', which is sym-linked to '/usr/share/google-chrome/extensions/arc/BOARD' at arc_setup time. Back to this issue, to solve it without touching Chrome code at all, we may similarly create symlinks under '/usr/share/chromeos-assets/regulatory_labels/' and point them to /usr/share/chromeos-assets/regulatory_labels/MODEL/*. I'll work on it soon.
,
Jan 17
(5 days ago)
That is for android default apps. For chrome default apps, the following bug provides some context and code links: https://b.corp.google.com/issues/69125404
,
Today
(4 hours ago)
I posted the CL here: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/1427239 However, as Dan pointed out in the review, we can't create symlink in /usr/share/chromeos-assets/regulatory_labels/' so this route won't work. Thus, I think we can't implement per-model e-label without touching private Chrome code here: https://cs.corp.google.com/clankium/src/chrome/browser/ui/webui/settings/about_handler.cc I can think of two options. (1) We use customization_id as the directory name for model-specific e-label files. e.g.: In /usr/share/chromeos-assets/regulatory_labels/, the file system tree should looks like --customization_id1--region_1--label.png --label.txt --region_2--label.png --label.txt --customization_id2--region_1--label.png --label.txt --region_2--label.png --label.txt And Chrome can find cutomization_id from /tmp/machine-info. If we go this route, we don't need to touch Chrome/chromium OS code at all. Only Chrome code needs to be modified. (2) We can still introduce a new attribute 'regulatory-label' to cros_config_schema.yaml and use it as the the directory name for model-specific e-label files. But we still need to modify Chrome code. Any thoughts?
,
Today
(63 minutes ago)
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by philipchen@chromium.org
, Jan 15