If the --disable-extensions commandline flag is present, we still load all installed extensions through InstalledLoader::LoadAllExtensions(). [1] The difference is that we don't then fully add the extension - there's an early-out in ExtensionService::AddExtension(). [2] However, this early-out does not apply to external extensions.
With --disable-extensions, we also don't create external extension providers. [3] Finally, when we initialize the extensions system, we'll check to see if there are any "orphaned" external extensions, where "orphaned" here means "not accounted for by an external providers". If there are any orphaned extensions, we'll uninstall them.
The effect of this is that we end up uninstalling all external extensions any time the --disable-extensions commandline flag is used. But they'll just be re-installed the next time chrome starts without --disable-extensions.
There's at least two things that seem wrong here:
- Why do we always load external extensions with --disable-extensions? That seems... wrong. *Maybe* we should always load policy extensions, but definitely not ones specified in the registry.
- We shouldn't be uninstalling extensions as a result of --disable-extensions.
Comment 1 by rdevlin....@chromium.org
, Apr 16 2018