chromium/chrome/browser/resource_coordinator/decision_details.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#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 {

// These are intended to be human readable descriptions of the various failure
// reasons. They don't need to be localized as they are for a developer-only
// WebUI.
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) {}

}  // namespace

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() {}

}  // namespace resource_coordinator