#include "chrome/browser/web_applications/isolated_web_apps/test/key_distribution/test_utils.h"
#include "base/base64.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/functional/callback.h"
#include "base/json/json_writer.h"
#include "base/path_service.h"
#include "base/scoped_observation.h"
#include "base/test/test_future.h"
#include "base/values.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/component_updater/iwa_key_distribution_component_installer.h"
#include "components/component_updater/component_updater_paths.h"
namespace web_app::test {
namespace {
class ComponentUpdateWaiter : public IwaKeyDistributionInfoProvider::Observer { … };
}
base::expected<void, IwaKeyDistributionInfoProvider::ComponentUpdateError>
UpdateKeyDistributionInfo(const base::Version& version,
const base::FilePath& path) { … }
base::expected<void, IwaKeyDistributionInfoProvider::ComponentUpdateError>
UpdateKeyDistributionInfo(const base::Version& version,
const IwaKeyDistribution& kd_proto) { … }
base::expected<void, IwaKeyDistributionInfoProvider::ComponentUpdateError>
UpdateKeyDistributionInfo(
const base::Version& version,
const std::string& web_bundle_id,
std::optional<base::span<const uint8_t>> expected_key) { … }
base::expected<void, IwaKeyDistributionInfoProvider::ComponentUpdateError>
InstallIwaKeyDistributionComponent(const base::Version& version,
const IwaKeyDistribution& kd_proto) { … }
base::expected<void, IwaKeyDistributionInfoProvider::ComponentUpdateError>
InstallIwaKeyDistributionComponent(
const base::Version& version,
const std::string& web_bundle_id,
std::optional<base::span<const uint8_t>> expected_key) { … }
}