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

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

Issue 10542048: Add a group policy controlling which sites can install extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: yozments Created 8 years, 6 months 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
Index: chrome/browser/extensions/extension_browsertest.cc
diff --git a/chrome/browser/extensions/extension_browsertest.cc b/chrome/browser/extensions/extension_browsertest.cc
index 5faf4b39fa7d54022144bc93ece6409a5b89ab2f..e6c8c497e9bf7aad2fd9f47c5d53f8d8201a535b 100644
--- a/chrome/browser/extensions/extension_browsertest.cc
+++ b/chrome/browser/extensions/extension_browsertest.cc
@@ -303,8 +303,11 @@ const Extension* ExtensionBrowserTest::InstallOrUpdateExtension(
scoped_refptr<CrxInstaller> installer(
CrxInstaller::Create(service, install_ui));
installer->set_expected_id(id);
- installer->set_allow_off_store_install(true);
installer->set_is_gallery_install(from_webstore);
+ if (!from_webstore) {
+ installer->set_off_store_install_allow_reason(
+ CrxInstaller::OffStoreInstallAllowedInTest);
+ }
content::NotificationRegistrar registrar;
registrar.Add(this, chrome::NOTIFICATION_CRX_INSTALLER_DONE,

Powered by Google App Engine
This is Rietveld 408576698