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

Unified Diff: chrome/browser/extensions/crx_installer.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/crx_installer.cc
diff --git a/chrome/browser/extensions/crx_installer.cc b/chrome/browser/extensions/crx_installer.cc
index 4b9602f4e417a3dd4e86226b5f117f13e09289f8..5c434b87070cff630c6e66248b90c2880b3e16de 100644
--- a/chrome/browser/extensions/crx_installer.cc
+++ b/chrome/browser/extensions/crx_installer.cc
@@ -97,7 +97,7 @@ CrxInstaller::CrxInstaller(base::WeakPtr<ExtensionService> frontend_weak,
allow_silent_install_(false),
install_cause_(extension_misc::INSTALL_CAUSE_UNSET),
creation_flags_(Extension::NO_FLAGS),
- allow_off_store_install_(false) {
+ off_store_install_allow_reason_(OffStoreInstallDisallowed) {
if (!approval)
return;
@@ -258,9 +258,12 @@ bool CrxInstaller::AllowInstall(const Extension* extension,
if (is_gallery_install()) {
UMA_HISTOGRAM_ENUMERATION(kHistogramName, OnStoreInstall,
NumOffStoreInstallDecision);
- } else if (allow_off_store_install_) {
+ } else if (off_store_install_allow_reason_ != OffStoreInstallDisallowed) {
UMA_HISTOGRAM_ENUMERATION(kHistogramName, OffStoreInstallAllowed,
NumOffStoreInstallDecision);
+ UMA_HISTOGRAM_ENUMERATION("Extensions.OffStoreInstallAllowReason",
+ off_store_install_allow_reason_,
+ NumOffStoreInstallAllowReasons);
} else {
UMA_HISTOGRAM_ENUMERATION(kHistogramName, OffStoreInstallDisallowed,
NumOffStoreInstallDecision);

Powered by Google App Engine
This is Rietveld 408576698