chromium/chrome/browser/extensions/standard_management_policy_provider.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/extensions/standard_management_policy_provider.h"

#include <string>

#include "base/logging.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/extensions/extension_management.h"
#include "chrome/grit/generated_resources.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension.h"
#include "extensions/common/manifest.h"
#include "extensions/strings/grit/extensions_strings.h"
#include "ui/base/l10n/l10n_util.h"

#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
#include "chrome/browser/enterprise/browser_management/management_service_factory.h"
#include "components/safe_browsing/core/common/features.h"
#endif

namespace extensions {

#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
// Disables off-store force-installed extensions in low trust environments.
BASE_FEATURE(kDisableOffstoreForceInstalledExtensionsInLowTrustEnviroment,
             "DisableOffstoreForceInstalledExtensionsInLowTrustEnviroment",
             base::FEATURE_ENABLED_BY_DEFAULT);
#endif

namespace {

// Returns whether the extension can be modified under admin policy or not, and
// fills |error| with corresponding error message if necessary.
bool AdminPolicyIsModifiable(const Extension* source_extension,
                             const Extension* extension,
                             std::u16string* error) {}

}  // namespace

StandardManagementPolicyProvider::StandardManagementPolicyProvider(
    ExtensionManagement* settings,
    Profile* profile)
    :{}

StandardManagementPolicyProvider::~StandardManagementPolicyProvider() {}

std::string
    StandardManagementPolicyProvider::GetDebugPolicyProviderName() const {}

bool StandardManagementPolicyProvider::UserMayLoad(
    const Extension* extension,
    std::u16string* error) const {}

bool StandardManagementPolicyProvider::UserMayInstall(
    const Extension* extension,
    std::u16string* error) const {}

bool StandardManagementPolicyProvider::UserMayModifySettings(
    const Extension* extension,
    std::u16string* error) const {}

bool StandardManagementPolicyProvider::ExtensionMayModifySettings(
    const Extension* source_extension,
    const Extension* extension,
    std::u16string* error) const {}

bool StandardManagementPolicyProvider::MustRemainEnabled(
    const Extension* extension,
    std::u16string* error) const {}

bool StandardManagementPolicyProvider::MustRemainDisabled(
    const Extension* extension,
    disable_reason::DisableReason* reason,
    std::u16string* error) const {}

bool StandardManagementPolicyProvider::MustRemainInstalled(
    const Extension* extension,
    std::u16string* error) const {}

bool StandardManagementPolicyProvider::ShouldForceUninstall(
    const Extension* extension,
    std::u16string* error) const {}

bool StandardManagementPolicyProvider::ReturnLoadError(
    const extensions::Extension* extension,
    std::u16string* error) const {}

}  // namespace extensions