New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 921914 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Feature



Sign in to add a comment

Digital regulatory labels for unibuild products

Project Member Reported by michae...@chromium.org, Jan 15

Issue description

Chrome 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.


 
Cc: shapiroc@chromium.org
Labels: -Restrict-View-Google
I don't think this needs RVG. Making public.
Owner: nedngu...@google.com
Status: Assigned (was: Untriaged)
I will work on this bug with some guidance from Charles
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



Owner: philipchen@chromium.org
I'll give it a try.
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?  
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.
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?
> 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).

Comment 10 by shapiroc@chromium.org, 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.

Comment 11 by philipchen@google.com, Jan 16 (6 days ago)

Charles, could you point me to the code where we expose model name to Chrome?

Comment 12 by philipchen@chromium.org, 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.

Comment 13 by shapiroc@chromium.org, 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

Comment 14 by philipchen@chromium.org, 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?

Comment 15 by philipchen@chromium.org, Today (63 minutes ago)

Labels: -Pri-3 Pri-2

Sign in to add a comment