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

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

Issue 2668863002: [Extensions] Remove FeatureSwitch::easy_off_store_install (Closed)
Patch Set: Add TODO for histograms Created 3 years, 11 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 2d93807a4948161a743ebe808a43c75b878a219b..bab5ac73d5b0fbab0af0f34042e8f51ab1d5c4e9 100644
--- a/chrome/browser/extensions/crx_installer.cc
+++ b/chrome/browser/extensions/crx_installer.cc
@@ -49,7 +49,6 @@
#include "extensions/browser/install_flag.h"
#include "extensions/browser/notification_types.h"
#include "extensions/common/extension_icon_set.h"
-#include "extensions/common/feature_switch.h"
#include "extensions/common/file_util.h"
#include "extensions/common/manifest.h"
#include "extensions/common/manifest_handlers/kiosk_mode_info.h"
@@ -327,41 +326,32 @@ CrxInstallError CrxInstaller::AllowInstall(const Extension* extension) {
}
if (install_cause_ == extension_misc::INSTALL_CAUSE_USER_DOWNLOAD) {
- if (FeatureSwitch::easy_off_store_install()->IsEnabled()) {
- const char kHistogramName[] = "Extensions.OffStoreInstallDecisionEasy";
- if (is_gallery_install()) {
- UMA_HISTOGRAM_ENUMERATION(kHistogramName, OnStoreInstall,
- NumOffStoreInstallDecision);
- } else {
- UMA_HISTOGRAM_ENUMERATION(kHistogramName, OffStoreInstallAllowed,
- NumOffStoreInstallDecision);
- }
+ // TODO(devlin): It appears that these histograms are never logged. We
+ // should either add them to histograms.xml or delete them.
lazyboy 2017/02/01 20:12:13 We should also consider dropping the "Hard" suffix
+ const char kHistogramName[] = "Extensions.OffStoreInstallDecisionHard";
+ if (is_gallery_install()) {
+ UMA_HISTOGRAM_ENUMERATION(kHistogramName,
+ OffStoreInstallDecision::OnStoreInstall,
+ NumOffStoreInstallDecision);
+ } else if (off_store_install_allow_reason_ != OffStoreInstallDisallowed) {
+ UMA_HISTOGRAM_ENUMERATION(kHistogramName,
+ OffStoreInstallDecision::OffStoreInstallAllowed,
+ NumOffStoreInstallDecision);
+ UMA_HISTOGRAM_ENUMERATION("Extensions.OffStoreInstallAllowReason",
+ off_store_install_allow_reason_,
+ NumOffStoreInstallAllowReasons);
} else {
- const char kHistogramName[] = "Extensions.OffStoreInstallDecisionHard";
- if (is_gallery_install()) {
- UMA_HISTOGRAM_ENUMERATION(kHistogramName,
- OffStoreInstallDecision::OnStoreInstall,
- NumOffStoreInstallDecision);
- } else if (off_store_install_allow_reason_ != OffStoreInstallDisallowed) {
- UMA_HISTOGRAM_ENUMERATION(
- kHistogramName, OffStoreInstallDecision::OffStoreInstallAllowed,
- NumOffStoreInstallDecision);
- UMA_HISTOGRAM_ENUMERATION("Extensions.OffStoreInstallAllowReason",
- off_store_install_allow_reason_,
- NumOffStoreInstallAllowReasons);
- } else {
- UMA_HISTOGRAM_ENUMERATION(
- kHistogramName, OffStoreInstallDecision::OffStoreInstallDisallowed,
- NumOffStoreInstallDecision);
- // Don't delete source in this case so that the user can install
- // manually if they want.
- delete_source_ = false;
- did_handle_successfully_ = false;
-
- return CrxInstallError(CrxInstallError::ERROR_OFF_STORE,
- l10n_util::GetStringUTF16(
- IDS_EXTENSION_INSTALL_DISALLOWED_ON_SITE));
- }
+ UMA_HISTOGRAM_ENUMERATION(
+ kHistogramName, OffStoreInstallDecision::OffStoreInstallDisallowed,
+ NumOffStoreInstallDecision);
+ // Don't delete source in this case so that the user can install
+ // manually if they want.
+ delete_source_ = false;
+ did_handle_successfully_ = false;
+
+ return CrxInstallError(
+ CrxInstallError::ERROR_OFF_STORE,
+ l10n_util::GetStringUTF16(IDS_EXTENSION_INSTALL_DISALLOWED_ON_SITE));
}
}
« no previous file with comments | « chrome/browser/download/download_target_determiner.cc ('k') | chrome/browser/extensions/crx_installer_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698