#include "chrome/browser/policy/value_provider/extension_policies_value_provider.h"
#include <memory>
#include "base/memory/scoped_refptr.h"
#include "base/values.h"
#include "chrome/browser/policy/chrome_policy_conversions_client.h"
#include "chrome/browser/policy/schema_registry_service.h"
#include "chrome/browser/policy/value_provider/value_provider_util.h"
#include "chrome/browser/profiles/profile.h"
#include "components/policy/core/browser/policy_conversions.h"
#include "components/policy/core/common/policy_namespace.h"
#include "components/policy/core/common/policy_service.h"
#include "components/policy/core/common/schema.h"
#include "components/policy/core/common/schema_map.h"
#include "components/policy/core/common/schema_registry.h"
#include "content/public/browser/web_contents.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_set.h"
#include "extensions/common/manifest.h"
#include "extensions/common/manifest_constants.h"
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "chrome/browser/ash/profiles/profile_helper.h"
#endif
namespace {
bool ContainsStorageManagedSchema(const extensions::Extension* extension) { … }
void AddExtensionPolicyValueToDict(base::Value& policy,
base::Value::Dict& extension_policies) { … }
}
ExtensionPoliciesValueProvider::ExtensionPoliciesValueProvider(Profile* profile)
: … { … }
ExtensionPoliciesValueProvider::~ExtensionPoliciesValueProvider() { … }
base::Value::Dict ExtensionPoliciesValueProvider::GetValues() { … }
base::Value::Dict ExtensionPoliciesValueProvider::GetNames() { … }
base::Value::Dict ExtensionPoliciesValueProvider::GetExtensionPolicyNames(
policy::PolicyDomain policy_domain) { … }
void ExtensionPoliciesValueProvider::OnExtensionLoaded(
content::BrowserContext* browser_context,
const extensions::Extension* extension) { … }
void ExtensionPoliciesValueProvider::OnExtensionUnloaded(
content::BrowserContext* browser_context,
const extensions::Extension* extension,
extensions::UnloadedExtensionReason reason) { … }
void ExtensionPoliciesValueProvider::OnPolicyUpdated(
const policy::PolicyNamespace& ns,
const policy::PolicyMap& previous,
const policy::PolicyMap& current) { … }