#include "extensions/renderer/feature_cache.h"
#include "base/command_line.h"
#include "base/containers/map_util.h"
#include "base/ranges/algorithm.h"
#include "content/public/common/content_switches.h"
#include "extensions/common/context_data.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_api.h"
#include "extensions/common/features/feature_provider.h"
#include "extensions/common/mojom/context_type.mojom.h"
#include "extensions/renderer/dispatcher.h"
namespace extensions {
FeatureCache::ExtensionFeatureData::ExtensionFeatureData() = default;
FeatureCache::ExtensionFeatureData::ExtensionFeatureData(
const ExtensionFeatureData&) = default;
FeatureCache::ExtensionFeatureData::~ExtensionFeatureData() = default;
FeatureCache::FeatureCache() = default;
FeatureCache::~FeatureCache() = default;
FeatureCache::FeatureNameVector FeatureCache::GetAvailableFeatures(
mojom::ContextType context_type,
const Extension* extension,
const GURL& url,
const ContextData& context_data) { … }
FeatureCache::FeatureNameVector
FeatureCache::GetDeveloperModeRestrictedFeatures(
mojom::ContextType context_type,
const Extension* extension,
const GURL& url,
const ContextData& context_data) { … }
void FeatureCache::InvalidateExtension(const ExtensionId& extension_id) { … }
void FeatureCache::InvalidateAllExtensions() { … }
const FeatureCache::ExtensionFeatureData& FeatureCache::GetFeaturesFromCache(
mojom::ContextType context_type,
const Extension* extension,
const GURL& origin,
int context_id,
const ContextData& context_data) { … }
FeatureCache::ExtensionFeatureData FeatureCache::CreateCacheEntry(
mojom::ContextType context_type,
const Extension* extension,
const GURL& origin,
int context_id,
const ContextData& context_data) { … }
}