chromium/services/resource_coordinator/memory_instrumentation/graph.cc

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

#include "services/resource_coordinator/memory_instrumentation/graph.h"

#include "base/containers/adapters.h"
#include "base/containers/contains.h"
#include "base/functional/callback.h"
#include "base/memory/raw_ptr.h"
#include "base/strings/string_tokenizer.h"

namespace memory_instrumentation {

namespace {

MemoryAllocatorDumpGuid;
Edge;
PostOrderIterator;
PreOrderIterator;
Process;
Node;

}  // namespace

GlobalDumpGraph::GlobalDumpGraph()
    :{}
GlobalDumpGraph::~GlobalDumpGraph() {}

Process* GlobalDumpGraph::CreateGraphForProcess(base::ProcessId process_id) {}

void GlobalDumpGraph::AddNodeOwnershipEdge(Node* owner,
                                           Node* owned,
                                           int importance) {}

Node* GlobalDumpGraph::CreateNode(Process* process_graph, Node* parent) {}

PreOrderIterator GlobalDumpGraph::VisitInDepthFirstPreOrder() {}

PostOrderIterator GlobalDumpGraph::VisitInDepthFirstPostOrder() {}

Process::Process(base::ProcessId pid, GlobalDumpGraph* global_graph)
    :{}
Process::~Process() {}

Node* Process::CreateNode(MemoryAllocatorDumpGuid guid,
                          std::string_view path,
                          bool weak) {}

Node* Process::FindNode(std::string_view path) {}

Node::Node(Process* dump_graph, Node* parent)
    :{}
Node::~Node() {}

Node* Node::GetChild(std::string_view name) {}

void Node::InsertChild(std::string_view name, Node* node) {}

Node* Node::CreateChild(std::string_view name) {}

bool Node::IsDescendentOf(const Node& possible_parent) const {}

void Node::AddOwnedByEdge(Edge* edge) {}

void Node::SetOwnsEdge(Edge* owns_edge) {}

void Node::AddEntry(std::string name,
                    Node::Entry::ScalarUnits units,
                    uint64_t value) {}

void Node::AddEntry(std::string name, std::string value) {}

Node::Entry::Entry(Entry::ScalarUnits units, uint64_t value)
    :{}

Node::Entry::Entry(std::string value)
    :{}

Edge::Edge(Node* source, Node* target, int priority)
    :{}

PreOrderIterator::PreOrderIterator(
    std::vector<raw_ptr<Node, VectorExperimental>> roots)
    :{}
PreOrderIterator::PreOrderIterator(PreOrderIterator&& other) = default;
PreOrderIterator::~PreOrderIterator() {}

// Yields the next node in the DFS post-order traversal.
Node* PreOrderIterator::next() {}

PostOrderIterator::PostOrderIterator(
    std::vector<raw_ptr<Node, VectorExperimental>> roots)
    :{}
PostOrderIterator::PostOrderIterator(PostOrderIterator&& other) = default;
PostOrderIterator::~PostOrderIterator() = default;

// Yields the next node in the DFS post-order traversal.
Node* PostOrderIterator::next() {}

}  // namespace memory_instrumentation