| Index: chrome/browser/extensions/external_provider_impl.cc
|
| diff --git a/chrome/browser/extensions/external_provider_impl.cc b/chrome/browser/extensions/external_provider_impl.cc
|
| index 55318ec28a75534abe86a0afabd33cc8c47ebfb7..fac59a1dab80898eae080f0614e40b4d6f2d2231 100644
|
| --- a/chrome/browser/extensions/external_provider_impl.cc
|
| +++ b/chrome/browser/extensions/external_provider_impl.cc
|
| @@ -314,6 +314,21 @@ void ExternalProviderImpl::CreateExternalProviders(
|
| VisitorInterface* service,
|
| Profile* profile,
|
| ProviderCollection* provider_list) {
|
| + // Policies are mandatory so they can't be skipped with command line flag.
|
| + provider_list->push_back(
|
| + linked_ptr<ExternalProviderInterface>(
|
| + new ExternalProviderImpl(
|
| + service,
|
| + new ExternalPolicyLoader(profile),
|
| + Extension::INVALID,
|
| + Extension::EXTERNAL_POLICY_DOWNLOAD,
|
| + Extension::NO_FLAGS)));
|
| +
|
| + // In tests don't install extensions from default external sources.
|
| + // It would only slowdown tests and make them flaky.
|
| + if (CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kDisableDefaultApps))
|
| + return;
|
|
|
| // On Mac OS, items in /Library/... should be written by the superuser.
|
| // Check that all components of the path are writable by root only.
|
| @@ -385,15 +400,6 @@ void ExternalProviderImpl::CreateExternalProviders(
|
| bundled_extension_creation_flags)));
|
| #endif
|
|
|
| - provider_list->push_back(
|
| - linked_ptr<ExternalProviderInterface>(
|
| - new ExternalProviderImpl(
|
| - service,
|
| - new ExternalPolicyLoader(profile),
|
| - Extension::INVALID,
|
| - Extension::EXTERNAL_POLICY_DOWNLOAD,
|
| - Extension::NO_FLAGS)));
|
| -
|
| #if !defined(OS_CHROMEOS)
|
| // The default apps are installed as INTERNAL but use the external
|
| // extension installer codeflow.
|
|
|