chromium/chrome/browser/component_updater/commerce_heuristics_component_installer.cc

// Copyright 2022 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/component_updater/commerce_heuristics_component_installer.h"

#include <stdint.h>

#include <memory>
#include <string>
#include <vector>

#include "base/feature_list.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/functional/callback.h"
#include "base/logging.h"
#include "base/task/thread_pool.h"
#include "components/commerce/core/commerce_heuristics_data.h"
#include "components/component_updater/component_updater_paths.h"
#if !BUILDFLAG(IS_ANDROID)
#include "chrome/browser/new_tab_page/new_tab_page_util.h"
#include "components/search/ntp_features.h"
#else
#include "components/commerce/core/commerce_feature_list.h"
#endif

namespace {

// The SHA256 of the SubjectPublicKeyInfo used to sign the extension.
// The extension id is: cocncanleafgejenidihemfflagifjic
const uint8_t kCommerceHeuristicsPublicKeySHA256[32] =;

constexpr char kCommerceHeuristicsManifestName[] =;
constexpr base::FilePath::CharType kCommerceHintHeuristicsFileName[] =);
constexpr base::FilePath::CharType kCommerceGlobalHeuristicsFileName[] =);
constexpr base::FilePath::CharType kCommerceProductIDHeuristicsFileName[] =);
constexpr base::FilePath::CharType kCommerceCartExtractionScriptFileName[] =);

base::FilePath GetCommerceHintHeuristicsInstalledPath(
    const base::FilePath& base) {}

base::FilePath GetCommerceGlobalHeuristicsInstalledPath(
    const base::FilePath& base) {}

base::FilePath GetCommerceProductIDHeuristicsInstalledPath(
    const base::FilePath& base) {}

base::FilePath GetCommerceCartExtractionScriptInstalledPath(
    const base::FilePath& base) {}

void LoadHeuristicFilesFromDisk(const base::Version& version,
                                const base::FilePath& install_dir) {}

}  // namespace

namespace component_updater {

bool CommerceHeuristicsInstallerPolicy::
    SupportsGroupPolicyEnabledComponentUpdates() const {}

bool CommerceHeuristicsInstallerPolicy::RequiresNetworkEncryption() const {}

update_client::CrxInstaller::Result
CommerceHeuristicsInstallerPolicy::OnCustomInstall(
    const base::Value::Dict& manifest,
    const base::FilePath& install_dir) {}

void CommerceHeuristicsInstallerPolicy::OnCustomUninstall() {}

void CommerceHeuristicsInstallerPolicy::ComponentReady(
    const base::Version& version,
    const base::FilePath& install_dir,
    base::Value::Dict manifest) {}

// Called during startup and installation before ComponentReady().
bool CommerceHeuristicsInstallerPolicy::VerifyInstallation(
    const base::Value::Dict& manifest,
    const base::FilePath& install_dir) const {}

base::FilePath CommerceHeuristicsInstallerPolicy::GetRelativeInstallDir()
    const {}

void CommerceHeuristicsInstallerPolicy::GetHash(
    std::vector<uint8_t>* hash) const {}

std::string CommerceHeuristicsInstallerPolicy::GetName() const {}

update_client::InstallerAttributes
CommerceHeuristicsInstallerPolicy::GetInstallerAttributes() const {}

void RegisterCommerceHeuristicsComponent(
    component_updater::ComponentUpdateService* cus) {}

}  // namespace component_updater