| Index: chrome/browser/extensions/extension_util.cc
|
| diff --git a/chrome/browser/extensions/extension_util.cc b/chrome/browser/extensions/extension_util.cc
|
| index ba4c4704ca4749d34ab67cb7b071730c675ae23c..e436f1ed428b5b04b91107055efd28698c214412 100644
|
| --- a/chrome/browser/extensions/extension_util.cc
|
| +++ b/chrome/browser/extensions/extension_util.cc
|
| @@ -28,9 +28,6 @@
|
| #include "extensions/browser/extension_util.h"
|
| #include "extensions/common/extension.h"
|
| #include "extensions/common/extension_icon_set.h"
|
| -#include "extensions/common/features/behavior_feature.h"
|
| -#include "extensions/common/features/feature.h"
|
| -#include "extensions/common/features/feature_provider.h"
|
| #include "extensions/common/manifest.h"
|
| #include "extensions/common/manifest_handlers/app_isolation_info.h"
|
| #include "extensions/common/manifest_handlers/incognito_info.h"
|
| @@ -50,13 +47,6 @@ namespace {
|
| // It is relevant only for supervised users.
|
| const char kWasInstalledByCustodianPrefName[] = "was_installed_by_custodian";
|
|
|
| -// Returns true if |extension| should always be enabled in incognito mode.
|
| -bool IsWhitelistedForIncognito(const Extension* extension) {
|
| - const Feature* feature = FeatureProvider::GetBehaviorFeature(
|
| - behavior_feature::kWhitelistedForIncognito);
|
| - return feature && feature->IsAvailableToExtension(extension).is_available();
|
| -}
|
| -
|
| // Returns |extension_id|. See note below.
|
| std::string ReloadExtensionIfEnabled(const std::string& extension_id,
|
| content::BrowserContext* context) {
|
| @@ -79,25 +69,6 @@ std::string ReloadExtensionIfEnabled(const std::string& extension_id,
|
|
|
| } // namespace
|
|
|
| -bool IsIncognitoEnabled(const std::string& extension_id,
|
| - content::BrowserContext* context) {
|
| - const Extension* extension = ExtensionRegistry::Get(context)->
|
| - GetExtensionById(extension_id, ExtensionRegistry::ENABLED);
|
| - if (extension) {
|
| - if (!util::CanBeIncognitoEnabled(extension))
|
| - return false;
|
| - // If this is an existing component extension we always allow it to
|
| - // work in incognito mode.
|
| - if (extension->location() == Manifest::COMPONENT ||
|
| - extension->location() == Manifest::EXTERNAL_COMPONENT) {
|
| - return true;
|
| - }
|
| - if (IsWhitelistedForIncognito(extension))
|
| - return true;
|
| - }
|
| - return ExtensionPrefs::Get(context)->IsIncognitoEnabled(extension_id);
|
| -}
|
| -
|
| void SetIsIncognitoEnabled(const std::string& extension_id,
|
| content::BrowserContext* context,
|
| bool enabled) {
|
|
|