Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Unified Diff: chrome/browser/extensions/external_provider_impl.cc

Issue 11359105: Don't install external extensions in tests (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: don't skip policy Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/default_apps.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « chrome/browser/extensions/default_apps.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698