chromium/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_source.cc

// Copyright 2024 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/web_applications/isolated_web_apps/isolated_web_app_source.h"

#include <ostream>

#include "base/files/file_path.h"
#include "base/functional/overloaded.h"
#include "base/json/values_util.h"
#include "base/strings/to_string.h"
#include "base/values.h"
#include "third_party/abseil-cpp/absl/types/variant.h"
#include "url/origin.h"

namespace web_app {

namespace {

IwaSourceBundleModeAndFileOp ToBundleModeAndFileOp(
    IwaSourceBundleDevFileOp file_op) {}

IwaSourceBundleModeAndFileOp ToBundleModeAndFileOp(
    IwaSourceBundleProdFileOp file_op) {}

}  // namespace

IwaSourceProxy::IwaSourceProxy(url::Origin proxy_url)
    :{}
IwaSourceProxy::~IwaSourceProxy() = default;

bool IwaSourceProxy::operator==(const IwaSourceProxy& other) const = default;

base::Value IwaSourceProxy::ToDebugValue() const {}

std::ostream& operator<<(std::ostream& os, const IwaSourceProxy& source) {}

std::ostream& operator<<(std::ostream& os,
                         IwaSourceBundleModeAndFileOp file_op_and_mode) {}

std::ostream& operator<<(std::ostream& os, IwaSourceBundleDevFileOp file_op) {}

std::ostream& operator<<(std::ostream& os, IwaSourceBundleProdFileOp file_op) {}

namespace internal {

IwaSourceBundleBase::IwaSourceBundleBase(base::FilePath path)
    :{}
IwaSourceBundleBase::~IwaSourceBundleBase() = default;

bool IwaSourceBundleBase::operator==(const IwaSourceBundleBase&) const =
    default;

}  // namespace internal

IwaSourceBundle::IwaSourceBundle(base::FilePath path)
    :{}
IwaSourceBundle::~IwaSourceBundle() = default;

IwaSourceBundle::IwaSourceBundle(IwaSourceBundleWithMode other)
    :{}
IwaSourceBundle::IwaSourceBundle(IwaSourceBundleWithModeAndFileOp other)
    :{}

bool IwaSourceBundle::operator==(const IwaSourceBundle& other) const = default;

IwaSourceBundleWithModeAndFileOp IwaSourceBundle::WithModeAndFileOp(
    IwaSourceBundleModeAndFileOp mode_and_file_op) const {}

IwaSourceBundleDevModeWithFileOp IwaSourceBundle::WithDevModeFileOp(
    IwaSourceBundleDevFileOp file_op) const {}

IwaSourceBundleProdModeWithFileOp IwaSourceBundle::WithProdModeFileOp(
    IwaSourceBundleProdFileOp file_op) const {}

base::Value IwaSourceBundle::ToDebugValue() const {}

std::ostream& operator<<(std::ostream& os, const IwaSourceBundle& source) {}

IwaSourceBundleWithMode::IwaSourceBundleWithMode(base::FilePath path,
                                                 bool dev_mode)
    :{}
IwaSourceBundleWithMode::~IwaSourceBundleWithMode() = default;

IwaSourceBundleWithMode::IwaSourceBundleWithMode(IwaSourceBundleDevMode other)
    :{}
IwaSourceBundleWithMode::IwaSourceBundleWithMode(IwaSourceBundleProdMode other)
    :{}
IwaSourceBundleWithMode::IwaSourceBundleWithMode(
    IwaSourceBundleWithModeAndFileOp other)
    :{}

bool IwaSourceBundleWithMode::operator==(
    const IwaSourceBundleWithMode& other) const = default;

[[nodiscard]] IwaSourceBundleWithModeAndFileOp
IwaSourceBundleWithMode::WithFileOp(
    IwaSourceBundleProdFileOp prod_file_op,
    IwaSourceBundleDevFileOp dev_file_op) const {}

base::Value IwaSourceBundleWithMode::ToDebugValue() const {}

std::ostream& operator<<(std::ostream& os,
                         const IwaSourceBundleWithMode& source) {}

IwaSourceBundleDevMode::IwaSourceBundleDevMode(base::FilePath path)
    :{}
IwaSourceBundleDevMode::~IwaSourceBundleDevMode() = default;

bool IwaSourceBundleDevMode::operator==(
    const IwaSourceBundleDevMode& other) const = default;

IwaSourceBundleDevModeWithFileOp IwaSourceBundleDevMode::WithFileOp(
    IwaSourceBundleDevFileOp file_op) const {}

base::Value IwaSourceBundleDevMode::ToDebugValue() const {}

std::ostream& operator<<(std::ostream& os,
                         const IwaSourceBundleDevMode& source) {}

IwaSourceBundleProdMode::IwaSourceBundleProdMode(base::FilePath path)
    :{}
IwaSourceBundleProdMode::~IwaSourceBundleProdMode() = default;

bool IwaSourceBundleProdMode::operator==(
    const IwaSourceBundleProdMode& other) const = default;

IwaSourceBundleProdModeWithFileOp IwaSourceBundleProdMode::WithFileOp(
    IwaSourceBundleProdFileOp file_op) const {}

base::Value IwaSourceBundleProdMode::ToDebugValue() const {}

std::ostream& operator<<(std::ostream& os,
                         const IwaSourceBundleProdMode& source) {}

IwaSourceBundleWithModeAndFileOp::IwaSourceBundleWithModeAndFileOp(
    base::FilePath path,
    ModeAndFileOp mode_and_file_op)
    :{}
IwaSourceBundleWithModeAndFileOp::~IwaSourceBundleWithModeAndFileOp() = default;

IwaSourceBundleWithModeAndFileOp::IwaSourceBundleWithModeAndFileOp(
    IwaSourceBundleDevModeWithFileOp other)
    :{}
IwaSourceBundleWithModeAndFileOp::IwaSourceBundleWithModeAndFileOp(
    IwaSourceBundleProdModeWithFileOp other)
    :{}

bool IwaSourceBundleWithModeAndFileOp::operator==(
    const IwaSourceBundleWithModeAndFileOp& other) const = default;

bool IwaSourceBundleWithModeAndFileOp::dev_mode() const {}

base::Value IwaSourceBundleWithModeAndFileOp::ToDebugValue() const {}

std::ostream& operator<<(std::ostream& os,
                         const IwaSourceBundleWithModeAndFileOp& source) {}

IwaSourceBundleDevModeWithFileOp::IwaSourceBundleDevModeWithFileOp(
    base::FilePath path,
    FileOp file_op)
    :{}
IwaSourceBundleDevModeWithFileOp::~IwaSourceBundleDevModeWithFileOp() = default;

bool IwaSourceBundleDevModeWithFileOp::operator==(
    const IwaSourceBundleDevModeWithFileOp& other) const = default;

base::Value IwaSourceBundleDevModeWithFileOp::ToDebugValue() const {}

std::ostream& operator<<(std::ostream& os,
                         const IwaSourceBundleDevModeWithFileOp& source) {}

IwaSourceBundleProdModeWithFileOp::IwaSourceBundleProdModeWithFileOp(
    base::FilePath path,
    FileOp file_op)
    :{}
IwaSourceBundleProdModeWithFileOp::~IwaSourceBundleProdModeWithFileOp() =
    default;

bool IwaSourceBundleProdModeWithFileOp::operator==(
    const IwaSourceBundleProdModeWithFileOp& other) const = default;

base::Value IwaSourceBundleProdModeWithFileOp::ToDebugValue() const {}

std::ostream& operator<<(std::ostream& os,
                         const IwaSourceBundleProdModeWithFileOp& source) {}

IwaSource::IwaSource(IwaSourceWithMode other)
    :{}
IwaSource::IwaSource(IwaSourceWithModeAndFileOp other)
    :{}

IwaSource::IwaSource(const IwaSource& other) = default;
IwaSource& IwaSource::operator=(const IwaSource& other) = default;

IwaSource::~IwaSource() = default;

bool IwaSource::operator==(const IwaSource& other) const = default;

base::Value IwaSource::ToDebugValue() const {}

std::ostream& operator<<(std::ostream& os, const IwaSource& source) {}

// static
IwaSourceWithMode IwaSourceWithMode::FromStorageLocation(
    const base::FilePath& profile_dir,
    const IsolatedWebAppStorageLocation& storage_location) {}

IwaSourceWithMode::IwaSourceWithMode(IwaSourceDevMode other)
    :{}
IwaSourceWithMode::IwaSourceWithMode(IwaSourceProdMode other)
    :{}
IwaSourceWithMode::IwaSourceWithMode(IwaSourceWithModeAndFileOp other)
    :{}

IwaSourceWithMode::IwaSourceWithMode(const IwaSourceWithMode& other) = default;
IwaSourceWithMode& IwaSourceWithMode::operator=(
    const IwaSourceWithMode& other) = default;

IwaSourceWithMode::~IwaSourceWithMode() = default;

bool IwaSourceWithMode::operator==(const IwaSourceWithMode& other) const =
    default;

[[nodiscard]] IwaSourceWithModeAndFileOp IwaSourceWithMode::WithFileOp(
    IwaSourceBundleProdFileOp prod_file_op,
    IwaSourceBundleDevFileOp dev_file_op) const {}

bool IwaSourceWithMode::dev_mode() const {}

base::Value IwaSourceWithMode::ToDebugValue() const {}

std::ostream& operator<<(std::ostream& os, const IwaSourceWithMode& source) {}

// static
base::expected<IwaSourceDevMode, absl::monostate>
IwaSourceDevMode::FromStorageLocation(
    const base::FilePath& profile_dir,
    const IsolatedWebAppStorageLocation& storage_location) {}

IwaSourceDevMode::IwaSourceDevMode(IwaSourceDevModeWithFileOp other)
    :{}

IwaSourceDevMode::IwaSourceDevMode(const IwaSourceDevMode& other) = default;
IwaSourceDevMode& IwaSourceDevMode::operator=(const IwaSourceDevMode& other) =
    default;

IwaSourceDevMode::~IwaSourceDevMode() = default;

bool IwaSourceDevMode::operator==(const IwaSourceDevMode& other) const =
    default;

IwaSourceDevModeWithFileOp IwaSourceDevMode::WithFileOp(
    IwaSourceBundleDevFileOp file_op) const {}

base::Value IwaSourceDevMode::ToDebugValue() const {}

std::ostream& operator<<(std::ostream& os, const IwaSourceDevMode& source) {}

// static
base::expected<IwaSourceProdMode, absl::monostate>
IwaSourceProdMode::FromStorageLocation(
    const base::FilePath& profile_dir,
    const IsolatedWebAppStorageLocation& storage_location) {}

IwaSourceProdMode::IwaSourceProdMode(IwaSourceProdModeWithFileOp other)
    :{}

IwaSourceProdMode::IwaSourceProdMode(const IwaSourceProdMode& other) = default;
IwaSourceProdMode& IwaSourceProdMode::operator=(
    const IwaSourceProdMode& other) = default;

IwaSourceProdMode::~IwaSourceProdMode() = default;

bool IwaSourceProdMode::operator==(const IwaSourceProdMode& other) const =
    default;

IwaSourceProdModeWithFileOp IwaSourceProdMode::WithFileOp(
    IwaSourceBundleProdFileOp file_op) const {}

base::Value IwaSourceProdMode::ToDebugValue() const {}

std::ostream& operator<<(std::ostream& os, const IwaSourceProdMode& source) {}

IwaSourceWithModeAndFileOp::IwaSourceWithModeAndFileOp(
    IwaSourceDevModeWithFileOp other)
    :{}
IwaSourceWithModeAndFileOp::IwaSourceWithModeAndFileOp(
    IwaSourceProdModeWithFileOp other)
    :{}

IwaSourceWithModeAndFileOp::IwaSourceWithModeAndFileOp(
    const IwaSourceWithModeAndFileOp& other) = default;
IwaSourceWithModeAndFileOp& IwaSourceWithModeAndFileOp::operator=(
    const IwaSourceWithModeAndFileOp& other) = default;

IwaSourceWithModeAndFileOp::~IwaSourceWithModeAndFileOp() = default;

bool IwaSourceWithModeAndFileOp::operator==(
    const IwaSourceWithModeAndFileOp& other) const = default;

bool IwaSourceWithModeAndFileOp::dev_mode() const {}

base::Value IwaSourceWithModeAndFileOp::ToDebugValue() const {}

std::ostream& operator<<(std::ostream& os,
                         const IwaSourceWithModeAndFileOp& source) {}

IwaSourceDevModeWithFileOp::IwaSourceDevModeWithFileOp(
    const IwaSourceDevModeWithFileOp& other) = default;
IwaSourceDevModeWithFileOp& IwaSourceDevModeWithFileOp::operator=(
    const IwaSourceDevModeWithFileOp& other) = default;

IwaSourceDevModeWithFileOp::~IwaSourceDevModeWithFileOp() = default;

bool IwaSourceDevModeWithFileOp::operator==(
    const IwaSourceDevModeWithFileOp& other) const = default;

base::Value IwaSourceDevModeWithFileOp::ToDebugValue() const {}

std::ostream& operator<<(std::ostream& os,
                         const IwaSourceDevModeWithFileOp& source) {}

IwaSourceProdModeWithFileOp::IwaSourceProdModeWithFileOp(
    const IwaSourceProdModeWithFileOp& other) = default;
IwaSourceProdModeWithFileOp& IwaSourceProdModeWithFileOp::operator=(
    const IwaSourceProdModeWithFileOp& other) = default;

IwaSourceProdModeWithFileOp::~IwaSourceProdModeWithFileOp() = default;

bool IwaSourceProdModeWithFileOp::operator==(
    const IwaSourceProdModeWithFileOp& other) const = default;

base::Value IwaSourceProdModeWithFileOp::ToDebugValue() const {}

std::ostream& operator<<(std::ostream& os,
                         const IwaSourceProdModeWithFileOp& source) {}

}  // namespace web_app