chromium/components/services/heap_profiling/connection_manager.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 "components/services/heap_profiling/connection_manager.h"

#include <utility>

#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/json/string_escape.h"
#include "base/metrics/histogram_macros.h"
#include "components/services/heap_profiling/json_exporter.h"
#include "components/services/heap_profiling/public/cpp/profiling_client.h"

namespace heap_profiling {

// Tracking information for DumpProcessForTracing(). This struct is
// refcounted since there will be many background thread calls (one for each
// AllocationTracker) and the callback is only issued when each has
// responded.
//
// This class is not threadsafe, its members must only be accessed on the
// I/O thread.
struct ConnectionManager::DumpProcessesForTracingTracking
    : public base::RefCountedThreadSafe<DumpProcessesForTracingTracking> {};

struct ConnectionManager::Connection {};

ConnectionManager::ConnectionManager() {}
ConnectionManager::~ConnectionManager() = default;

void ConnectionManager::OnNewConnection(
    base::ProcessId pid,
    mojo::PendingRemote<mojom::ProfilingClient> client,
    mojom::ProcessType process_type,
    mojom::ProfilingParamsPtr params,
    mojom::ProfilingService::AddProfilingClientCallback
        started_profiling_closure) {}

std::vector<base::ProcessId> ConnectionManager::GetConnectionPids() {}

std::vector<base::ProcessId>
ConnectionManager::GetConnectionPidsThatNeedVmRegions() {}

void ConnectionManager::OnConnectionComplete(base::ProcessId pid) {}

void ConnectionManager::OnProfilingStarted(base::ProcessId pid) {}

void ConnectionManager::ReportMetrics() {}

void ConnectionManager::DumpProcessesForTracing(
    bool strip_path_from_mapped_files,
    bool write_proto,
    DumpProcessesForTracingCallback callback,
    VmRegions vm_regions) {}

bool ConnectionManager::ConvertProfileToExportParams(
    mojom::HeapProfilePtr profile,
    uint32_t sampling_rate,
    ExportParams* params) {}

void ConnectionManager::HeapProfileRetrieved(
    scoped_refptr<DumpProcessesForTracingTracking> tracking,
    base::ProcessId pid,
    mojom::ProcessType process_type,
    bool strip_path_from_mapped_files,
    uint32_t sampling_rate,
    mojom::HeapProfilePtr profile) {}

}  // namespace heap_profiling