Commit a4bc4842 authored by rdevlin.cronin's avatar rdevlin.cronin Committed by Commit bot

Revert of [Extensions] Enable sideloading prompt on mac on canary (patchset #3...

Revert of [Extensions] Enable sideloading prompt on mac on canary (patchset #3 id:40001 of https://codereview.chromium.org/2623033002/ )

Reason for revert:
Broke official mac compile

Original issue's description:
> [Extensions] Enable sideloading prompt on mac on canary
>
> BUG=669277
>
> Review-Url: https://codereview.chromium.org/2623033002
> Cr-Commit-Position: refs/heads/master@{#442983}
> Committed: https://chromium.googlesource.com/chromium/src/+/e7419b3ea146e6aa9ba26ec3fae255754f47cafb

TBR=lazyboy@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=669277

Review-Url: https://codereview.chromium.org/2628993002
Cr-Commit-Position: refs/heads/master@{#442993}
parent 2e36b96a
...@@ -2258,7 +2258,7 @@ int ExtensionService::GetDisableReasonsOnInstalled(const Extension* extension) { ...@@ -2258,7 +2258,7 @@ int ExtensionService::GetDisableReasonsOnInstalled(const Extension* extension) {
: disable_reasons; : disable_reasons;
} }
if (extensions::ExternalInstallManager::IsPromptingEnabled()) { if (FeatureSwitch::prompt_for_external_extensions()->IsEnabled()) {
// External extensions are initially disabled. We prompt the user before // External extensions are initially disabled. We prompt the user before
// enabling them. Hosted apps are excepted because they are not dangerous // enabling them. Hosted apps are excepted because they are not dangerous
// (they need to be launched by the user anyway). We also don't prompt for // (they need to be launched by the user anyway). We also don't prompt for
......
...@@ -84,16 +84,6 @@ ExternalInstallManager::ExternalInstallManager( ...@@ -84,16 +84,6 @@ ExternalInstallManager::ExternalInstallManager(
ExternalInstallManager::~ExternalInstallManager() { ExternalInstallManager::~ExternalInstallManager() {
} }
bool ExternalInstallManager::IsPromptingEnabled() {
// Enable this feature on canary on mac.
#if defined(OS_MACOSX) && defined(GOOGLE_CHROME_BUILD)
return GetCurrentChannel() <= version_info::Channel::CANARY;
#else
return FeatureSwitch::prompt_for_external_extensions()->IsEnabled();
#endif
}
void ExternalInstallManager::AddExternalInstallError(const Extension* extension, void ExternalInstallManager::AddExternalInstallError(const Extension* extension,
bool is_new_profile) { bool is_new_profile) {
// Error already exists or has been previously shown. // Error already exists or has been previously shown.
...@@ -126,7 +116,7 @@ void ExternalInstallManager::RemoveExternalInstallError( ...@@ -126,7 +116,7 @@ void ExternalInstallManager::RemoveExternalInstallError(
void ExternalInstallManager::UpdateExternalExtensionAlert() { void ExternalInstallManager::UpdateExternalExtensionAlert() {
// If the feature is not enabled do nothing. // If the feature is not enabled do nothing.
if (!IsPromptingEnabled()) if (!FeatureSwitch::prompt_for_external_extensions()->IsEnabled())
return; return;
// Look for any extensions that were disabled because of being unacknowledged // Look for any extensions that were disabled because of being unacknowledged
...@@ -229,7 +219,7 @@ void ExternalInstallManager::OnExtensionUninstalled( ...@@ -229,7 +219,7 @@ void ExternalInstallManager::OnExtensionUninstalled(
bool ExternalInstallManager::IsUnacknowledgedExternalExtension( bool ExternalInstallManager::IsUnacknowledgedExternalExtension(
const Extension& extension) const { const Extension& extension) const {
if (!IsPromptingEnabled()) if (!FeatureSwitch::prompt_for_external_extensions()->IsEnabled())
return false; return false;
int disable_reasons = extension_prefs_->GetDisableReasons(extension.id()); int disable_reasons = extension_prefs_->GetDisableReasons(extension.id());
......
...@@ -34,9 +34,6 @@ class ExternalInstallManager : public ExtensionRegistryObserver, ...@@ -34,9 +34,6 @@ class ExternalInstallManager : public ExtensionRegistryObserver,
bool is_first_run); bool is_first_run);
~ExternalInstallManager() override; ~ExternalInstallManager() override;
// Returns true if prompting for external extensions is enabled.
static bool IsPromptingEnabled();
// Removes the error associated with a given extension. // Removes the error associated with a given extension.
void RemoveExternalInstallError(const std::string& extension_id); void RemoveExternalInstallError(const std::string& extension_id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment