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

Issue 726697 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Task

Blocking:
issue 726700



Sign in to add a comment

//components/policy depends on //extensions, possibly violating the layering rule

Reported by most...@opera.com, May 26 2017

Issue description

//components/policy depends on //extensions which IIUC is specific to the chrome layer.  This appears to violate the layering rule, ie that components are only supposed to depend upon lower layers.

Reference:
https://chromium.googlesource.com/chromium/src/+/master/components/README
 

Comment 1 by most...@opera.com, May 26 2017

FYI, I was not sure which if any components to tag this with.

Comment 2 by jochen@chromium.org, May 26 2017

Components: Enterprise

Comment 3 by most...@opera.com, May 26 2017

Blocking: 726700
Cc: brettw@chromium.org emaxx@chromium.org
Owner: atwilson@chromium.org
Brett, looks like maybe this was added by https://codereview.chromium.org/2479593006 - we don't actually use anything from //extensions, we're just checking if enable_extensions is set in our BUILD.gn file. Is even this dependency (on whether extensions are enabled or not) disallowed?

Maksim, maybe we should just nuke our dependency on ENABLE_EXTENSIONS? It's limited to schema_registry.cc, and I think we could safely call SetExtensionsDomainsReady() regardless of whether the platform enables extensions or not - it's just an unnecessary observer invocation, right?


Comment 5 by emaxx@chromium.org, May 31 2017

Re schema_registry.cc - I don't think that the change to always call SetExtensionsDomainsReady is safe. It controls the initialization order of different parts (obtaining extensions' schemas, loading policies, exposing them). Normally SetExtensionsDomainsReady() is called from the extensions subsystem (from extensions::ManagedValueStoreCache::ExtensionTracker::Register), and that's why  schema_registry.cc has to fake this when under !ENABLE_EXTENSIONS.
But we can probably move this stub call of SetExtensionsDomainsReady() out from //components/policy - e.g. into //chrome/browser/policy/schema_registry_service_factory.cc where it's instantiated.
Owner: emaxx@chromium.org
Makes sense - maybe you can eliminate this dependency at some point - definitely seems cleaner.

Comment 7 by most...@vewd.com, Sep 28 2017

Cc: -hu...@opera.com most...@vewd.com hu...@vewd.com
Status: Assigned (was: Untriaged)

Sign in to add a comment