chromium/components/component_updater/installer_policies/origin_trials_component_installer.cc

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

#include "components/component_updater/installer_policies/origin_trials_component_installer.h"

#include <iterator>
#include <utility>
#include <vector>

#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/memory/ref_counted.h"
#include "base/path_service.h"
#include "base/values.h"
#include "components/component_updater/component_updater_paths.h"

// The client-side configuration for the origin trial framework can be
// overridden by an installed component named 'OriginTrials' (extension id
// llkgjffcdpffmhiakmfcdcblohccpfmo. This component currently consists of just a
// manifest.json file, which can contain a custom key named 'origin-trials'. The
// value of this key is a dictionary:
//
// {
//   "public-key": "<base64-encoding of replacement public key>",
//   "disabled-features": [<list of features to disable>],
//   "disabled-tokens":
//   {
//     "signatures": [<list of token signatures to disable, base64-encoded>]
//   }
// }
//
// If the component is not present in the user data directory, the default
// configuration will be used.

namespace component_updater {

namespace {

static const char kManifestOriginTrialsKey[] =;

// Extension id is llkgjffcdpffmhiakmfcdcblohccpfmo
const uint8_t kOriginTrialSha2Hash[] =;

}  // namespace

// static
void OriginTrialsComponentInstallerPolicy::GetComponentHash(
    std::vector<uint8_t>* hash) {}

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

bool OriginTrialsComponentInstallerPolicy::VerifyInstallation(
    const base::Value::Dict& manifest,
    const base::FilePath& install_dir) const {}

bool OriginTrialsComponentInstallerPolicy::
    SupportsGroupPolicyEnabledComponentUpdates() const {}

bool OriginTrialsComponentInstallerPolicy::RequiresNetworkEncryption() const {}

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

void OriginTrialsComponentInstallerPolicy::OnCustomUninstall() {}

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

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

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

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

}  // namespace component_updater