#include "components/services/app_service/public/cpp/package_id.h"
#include <optional>
#include <ostream>
#include <string>
#include "base/notreached.h"
#include "base/strings/strcat.h"
#include "components/services/app_service/public/cpp/app_types.h"
namespace apps {
namespace {
constexpr char kUnknownName[] = …;
constexpr char kArcPlatformName[] = …;
constexpr char kBorealisPlatformName[] = …;
constexpr char kChromeAppPlatformName[] = …;
constexpr char kGeForceNowPlatformName[] = …;
constexpr char kSystemPlatformName[] = …;
constexpr char kWebPlatformName[] = …;
constexpr char kWebShortcutPlatformName[] = …;
PackageType PlatformNameToPackageType(std::string_view platform_name) { … }
std::string_view PackageTypeToPlatformName(PackageType package_type) { … }
}
PackageId::PackageId(PackageType package_type, std::string_view identifier)
: … { … }
PackageId::PackageId() : … { … }
PackageId::PackageId(const PackageId&) = default;
PackageId& PackageId::operator=(const PackageId&) = default;
bool PackageId::operator<(const PackageId& rhs) const { … }
bool PackageId::operator==(const PackageId& rhs) const { … }
bool PackageId::operator!=(const PackageId& rhs) const { … }
std::optional<PackageId> PackageId::FromString(
std::string_view package_id_string) { … }
std::string PackageId::ToString() const { … }
std::ostream& operator<<(std::ostream& out, const PackageId& package_id) { … }
}