#ifndef COMPONENTS_PERFORMANCE_MANAGER_PUBLIC_VOTING_VOTING_H_
#define COMPONENTS_PERFORMANCE_MANAGER_PUBLIC_VOTING_VOTING_H_
#include <cstring>
#include <map>
#include <utility>
#include "base/check.h"
#include "base/check_op.h"
#include "base/containers/flat_map.h"
#include "base/dcheck_is_on.h"
#include "base/memory/raw_ptr.h"
#include "base/not_fatal_until.h"
#include "base/types/id_type.h"
#include "base/types/pass_key.h"
namespace performance_manager {
namespace voting {
template <typename TContextType, typename TVoteType, TVoteType DefaultVote>
class Vote final { … };
VoterId;
template <class VoteImpl>
class VoteObserver { … };
template <class VoteImpl>
class VotingChannelFactory;
template <class VoteImpl>
class VotingChannel { … };
template <class VoteImpl>
class VotingChannelFactory final { … };
template <typename ContextType, typename VoteType, VoteType DefaultVote>
Vote<ContextType, VoteType, DefaultVote>::Vote() = default;
template <typename ContextType, typename VoteType, VoteType DefaultVote>
Vote<ContextType, VoteType, DefaultVote>::Vote(VoteType vote,
const char* reason)
: … { … }
template <typename ContextType, typename VoteType, VoteType DefaultVote>
Vote<ContextType, VoteType, DefaultVote>::Vote(const Vote& rhs) = default;
template <typename ContextType, typename VoteType, VoteType DefaultVote>
Vote<ContextType, VoteType, DefaultVote>&
Vote<ContextType, VoteType, DefaultVote>::operator=(
const Vote<ContextType, VoteType, DefaultVote>& rhs) = default;
template <typename ContextType, typename VoteType, VoteType DefaultVote>
Vote<ContextType, VoteType, DefaultVote>::~Vote() = default;
template <typename ContextType, typename VoteType, VoteType DefaultVote>
bool Vote<ContextType, VoteType, DefaultVote>::operator==(
const Vote<ContextType, VoteType, DefaultVote>& vote) const { … }
template <typename ContextType, typename VoteType, VoteType DefaultVote>
bool Vote<ContextType, VoteType, DefaultVote>::operator!=(
const Vote<ContextType, VoteType, DefaultVote>& vote) const { … }
template <typename ContextType, typename VoteType, VoteType DefaultVote>
bool Vote<ContextType, VoteType, DefaultVote>::IsValid() const { … }
template <class VoteImpl>
VoteObserver<VoteImpl>::~VoteObserver() = default;
template <class VoteImpl>
VotingChannel<VoteImpl>::VotingChannel() = default;
template <class VoteImpl>
VotingChannel<VoteImpl>::VotingChannel(VotingChannel<VoteImpl>&& rhs) { … }
template <class VoteImpl>
VotingChannel<VoteImpl>& VotingChannel<VoteImpl>::operator=(
VotingChannel<VoteImpl>&& rhs) { … }
template <class VoteImpl>
VotingChannel<VoteImpl>::~VotingChannel() { … }
template <class VoteImpl>
void VotingChannel<VoteImpl>::SubmitVote(const ContextType* context,
const VoteImpl& vote) { … }
template <class VoteImpl>
void VotingChannel<VoteImpl>::ChangeVote(const ContextType* context,
const VoteImpl& new_vote) { … }
template <class VoteImpl>
void VotingChannel<VoteImpl>::InvalidateVote(const ContextType* context) { … }
template <class VoteImpl>
bool VotingChannel<VoteImpl>::IsValid() const { … }
template <class VoteImpl>
void VotingChannel<VoteImpl>::Reset() { … }
template <class VoteImpl>
VotingChannel<VoteImpl>::VotingChannel(
base::PassKey<VotingChannelFactory<VoteImpl>>,
VotingChannelFactory<VoteImpl>* factory,
VoterId<VoteImpl> voter_id)
: … { … }
template <class VoteImpl>
void VotingChannel<VoteImpl>::Take(VotingChannel<VoteImpl>&& rhs) { … }
template <class VoteImpl>
VotingChannelFactory<VoteImpl>::VotingChannelFactory(
VoteObserver<VoteImpl>* observer)
: … { … }
template <class VoteImpl>
VotingChannelFactory<VoteImpl>::~VotingChannelFactory() { … }
template <class VoteImpl>
VotingChannel<VoteImpl> VotingChannelFactory<VoteImpl>::BuildVotingChannel() { … }
template <class VoteImpl>
void VotingChannelFactory<VoteImpl>::OnVotingChannelDestroyed(
base::PassKey<VotingChannel<VoteImpl>>) { … }
}
}
#endif