chromium/services/resource_coordinator/memory_instrumentation/global_dump_graph_converter.h

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

#ifndef SERVICES_RESOURCE_COORDINATOR_MEMORY_INSTRUMENTATION_GLOBAL_DUMP_GRAPH_CONVERTER_H_
#define SERVICES_RESOURCE_COORDINATOR_MEMORY_INSTRUMENTATION_GLOBAL_DUMP_GRAPH_CONVERTER_H_

#include <map>
#include <memory>
#include <vector>

#include "services/resource_coordinator/memory_instrumentation/graph.h"
#include "third_party/perfetto/include/perfetto/ext/trace_processor/importers/memory_tracker/graph_processor.h"

namespace memory_instrumentation {

// Converts the Perfetto GlobalNodeGraph to the corresponding defined in
// Chromium type GlobalDumpGraph.
//
// Example usage:
//
// {
//   perfetto::trace_processor::GlobalNodeGraph graph;
//
//   GlobalDumpGraphConverter converter;
//   std::unique_ptr<GlobalDumpGraph> dumpGraph = converter.Convert(graph);
// }
class GlobalDumpGraphConverter {};

}  // namespace memory_instrumentation

#endif  // SERVICES_RESOURCE_COORDINATOR_MEMORY_INSTRUMENTATION_GLOBAL_DUMP_GRAPH_CONVERTER_H_