Chromium Code Reviews| 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..e2c4291672090b264bbf570ac447e6add1c37fb4 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 source. |
|
Gaurav
2012/11/09 17:35:03
"fron default external sources."
since we are are
Dmitry Polukhin
2012/11/09 17:49:55
Done.
|
| + // It will 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. |