#include "components/performance_manager/graph/policies/process_priority_policy.h"
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/memory/ptr_util.h"
#include "components/performance_manager/public/features.h"
#include "components/performance_manager/public/render_process_host_proxy.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_process_host.h"
namespace performance_manager {
namespace policies {
namespace {
#if DCHECK_IS_ON()
size_t g_instance_count = …;
#endif
ProcessPriorityPolicy::SetPriorityOnUiThreadCallback* g_callback = …;
base::Process::Priority ToProcessPriority(base::TaskPriority priority) { … }
void SetProcessPriorityOnUIThread(RenderProcessHostProxy rph_proxy,
base::Process::Priority priority) { … }
void DispatchSetProcessPriority(const ProcessNode* process_node,
base::Process::Priority priority) { … }
}
ProcessPriorityPolicy::ProcessPriorityPolicy() { … }
ProcessPriorityPolicy::~ProcessPriorityPolicy() { … }
void ProcessPriorityPolicy::SetCallbackForTesting(
SetPriorityOnUiThreadCallback callback) { … }
void ProcessPriorityPolicy::ClearCallbackForTesting() { … }
void ProcessPriorityPolicy::OnPassedToGraph(Graph* graph) { … }
void ProcessPriorityPolicy::OnTakenFromGraph(Graph* graph) { … }
void ProcessPriorityPolicy::OnProcessNodeAdded(
const ProcessNode* process_node) { … }
void ProcessPriorityPolicy::OnPriorityChanged(
const ProcessNode* process_node,
base::TaskPriority previous_value) { … }
}
}