Commit cc82ab85 authored by treib's avatar treib Committed by Commit bot

Register external extension providers also for supervised users.

Not registering them broke voice search for supervised users, because the corresponding extension comes from one of these providers.
It also resulted in inconsistent behavior for child accounts, where the providers would exist after the first sign-in, but not after the next browser restart.

BUG=458096,397951

Review URL: https://codereview.chromium.org/955683002

Cr-Commit-Position: refs/heads/master@{#318670}
parent f8374835
...@@ -498,7 +498,7 @@ void ExternalProviderImpl::CreateExternalProviders( ...@@ -498,7 +498,7 @@ void ExternalProviderImpl::CreateExternalProviders(
oem_extension_creation_flags))); oem_extension_creation_flags)));
} }
#elif defined(OS_LINUX) #elif defined(OS_LINUX)
if (!profile->IsSupervised()) { if (!profile->IsLegacySupervised()) {
provider_list->push_back( provider_list->push_back(
linked_ptr<ExternalProviderInterface>( linked_ptr<ExternalProviderInterface>(
new ExternalProviderImpl( new ExternalProviderImpl(
...@@ -514,7 +514,7 @@ void ExternalProviderImpl::CreateExternalProviders( ...@@ -514,7 +514,7 @@ void ExternalProviderImpl::CreateExternalProviders(
} }
#endif #endif
if (!profile->IsSupervised()) { if (!profile->IsLegacySupervised()) {
#if defined(OS_WIN) #if defined(OS_WIN)
provider_list->push_back( provider_list->push_back(
linked_ptr<ExternalProviderInterface>( linked_ptr<ExternalProviderInterface>(
...@@ -570,17 +570,17 @@ void ExternalProviderImpl::CreateExternalProviders( ...@@ -570,17 +570,17 @@ void ExternalProviderImpl::CreateExternalProviders(
Extension::FROM_WEBSTORE | Extension::FROM_WEBSTORE |
Extension::WAS_INSTALLED_BY_DEFAULT))); Extension::WAS_INSTALLED_BY_DEFAULT)));
#endif #endif
provider_list->push_back(
linked_ptr<ExternalProviderInterface>(
new ExternalProviderImpl(
service,
new ExternalComponentLoader(profile),
profile,
Manifest::INVALID_LOCATION,
Manifest::EXTERNAL_COMPONENT,
Extension::FROM_WEBSTORE | Extension::WAS_INSTALLED_BY_DEFAULT)));
} }
provider_list->push_back(
linked_ptr<ExternalProviderInterface>(
new ExternalProviderImpl(
service,
new ExternalComponentLoader(profile),
profile,
Manifest::INVALID_LOCATION,
Manifest::EXTERNAL_COMPONENT,
Extension::FROM_WEBSTORE | Extension::WAS_INSTALLED_BY_DEFAULT)));
} }
} // namespace extensions } // namespace extensions
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment