// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "components/metrics/call_stack_profile_collector.h" #include #include #include "components/metrics/call_stack_profile_encoding.h" #include "components/metrics/call_stack_profile_metrics_provider.h" #include "mojo/public/cpp/bindings/self_owned_receiver.h" namespace metrics { CallStackProfileCollector::CallStackProfileCollector() = default; CallStackProfileCollector::~CallStackProfileCollector() = default; // static void CallStackProfileCollector::Create( mojo::PendingReceiver receiver) { mojo::MakeSelfOwnedReceiver(std::make_unique(), std::move(receiver)); } void CallStackProfileCollector::Collect(base::TimeTicks start_timestamp, mojom::ProfileType profile_type, mojom::SampledProfilePtr profile) { CallStackProfileMetricsProvider::ReceiveSerializedProfile( start_timestamp, profile_type == mojom::ProfileType::kHeap, std::move(profile->contents)); } } // namespace metrics