chromium/chrome/browser/metrics/tab_footprint_aggregator.cc

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

#include "chrome/browser/metrics/tab_footprint_aggregator.h"

#include <limits>
#include <numeric>
#include <utility>

#include "base/containers/contains.h"
#include "services/metrics/public/cpp/ukm_builders.h"
#include "services/metrics/public/cpp/ukm_recorder.h"

PageId;
Memory_TabFootprint;

namespace {

static const uint64_t kInvalidAmount =;

// Unfortunately, there's no way to read attributes from |UkmEntryBuilderBase|
// instances so we can't build up counts in-place. We'll use |TabStats| for
// building the counts and copy the results to a |Memory_TabFootprint| to
// report them. See the |Memory_TabFootprint| event definition in ukm.xml for a
// description of each metric; they correspond to the getters of this class.
// Note that this class expects and reports values in terms of kilobytes while
// the ukm event uses megabytes.
class TabStats {};

}  // namespace

TabFootprintAggregator::TabFootprintAggregator() = default;
TabFootprintAggregator::~TabFootprintAggregator() = default;

void TabFootprintAggregator::AssociateMainFrame(ukm::SourceId sid,
                                                base::ProcessId pid,
                                                PageId page_id,
                                                uint64_t pmf_kb) {}

void TabFootprintAggregator::AssociateSubFrame(ukm::SourceId sid,
                                               base::ProcessId pid,
                                               PageId page_id,
                                               uint64_t pmf_kb) {}

void TabFootprintAggregator::AssociateFrame(ukm::SourceId sid,
                                            base::ProcessId pid,
                                            PageId page_id,
                                            uint64_t pmf_kb) {}

void TabFootprintAggregator::RecordPmfs(ukm::UkmRecorder* ukm_recorder) const {}