#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "chrome/browser/resource_coordinator/decision_details.h"
#include "services/metrics/public/cpp/ukm_builders.h"
namespace resource_coordinator {
namespace {
const char* kDecisionFailureReasonStrings[] = …;
static_assert …;
const char* kDecisionSuccessReasonStrings[] = …;
static_assert …;
void PopulateSuccessReason(
DecisionSuccessReason success_reason,
ukm::builders::TabManager_LifecycleStateChange* ukm) { … }
void PopulateFailureReason(
DecisionFailureReason failure_reason,
ukm::builders::TabManager_LifecycleStateChange* ukm) { … }
}
const char* ToString(DecisionFailureReason failure_reason) { … }
const char* ToString(DecisionSuccessReason success_reason) { … }
DecisionDetails::Reason::Reason()
: … { … }
DecisionDetails::Reason::Reason(DecisionSuccessReason success_reason)
: … { … }
DecisionDetails::Reason::Reason(DecisionFailureReason failure_reason)
: … { … }
DecisionDetails::Reason::Reason(const Reason& rhs) = default;
DecisionDetails::Reason::~Reason() = default;
DecisionDetails::Reason& DecisionDetails::Reason::operator=(const Reason& rhs) =
default;
bool DecisionDetails::Reason::IsValid() const { … }
bool DecisionDetails::Reason::IsSuccess() const { … }
bool DecisionDetails::Reason::IsFailure() const { … }
DecisionSuccessReason DecisionDetails::Reason::success_reason() const { … }
DecisionFailureReason DecisionDetails::Reason::failure_reason() const { … }
const char* DecisionDetails::Reason::ToString() const { … }
bool DecisionDetails::Reason::operator==(const Reason& rhs) const { … }
bool DecisionDetails::Reason::operator!=(const Reason& rhs) const { … }
DecisionDetails::DecisionDetails() : … { … }
DecisionDetails::~DecisionDetails() = default;
DecisionDetails& DecisionDetails::operator=(DecisionDetails&& rhs) { … }
bool DecisionDetails::AddReason(const Reason& reason) { … }
bool DecisionDetails::AddReason(DecisionFailureReason failure_reason) { … }
bool DecisionDetails::AddReason(DecisionSuccessReason success_reason) { … }
bool DecisionDetails::IsPositive() const { … }
DecisionSuccessReason DecisionDetails::SuccessReason() const { … }
DecisionFailureReason DecisionDetails::FailureReason() const { … }
void DecisionDetails::Populate(
ukm::builders::TabManager_LifecycleStateChange* ukm) const { … }
std::vector<std::string> DecisionDetails::GetFailureReasonStrings() const { … }
void DecisionDetails::Clear() { … }
bool DecisionDetails::CheckIfToggled() { … }
}