chromium/chrome/browser/metrics/usage_scenario/chrome_responsiveness_calculator_delegate.cc

// Copyright 2023 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/usage_scenario/chrome_responsiveness_calculator_delegate.h"

#include "base/check.h"
#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_functions.h"
#include "base/notreached.h"
#include "base/strings/strcat.h"
#include "base/system/sys_info.h"
#include "chrome/browser/metrics/usage_scenario/usage_scenario_data_store.h"
#include "chrome/browser/metrics/usage_scenario/usage_scenario_tracker.h"

namespace {

bool IsChromeUsedInScenario(Scenario scenario) {}

#if BUILDFLAG(IS_CHROMEOS)
// Returns true if available memory is less than 5.7% of total memory. It's
// based on ChromeOS stable 7 day aggregation ending May 20th 2024 from
// Memory.Experimental.AvailableMemoryPercent 10 percentile.
bool IsLowMemory() {
  auto available_bytes = base::SysInfo::AmountOfAvailablePhysicalMemory();
  auto total_bytes = base::SysInfo::AmountOfPhysicalMemory();
  return (available_bytes * 1000 / total_bytes) < 57;
}
#endif  // BUILDFLAG(IS_CHROMEOS)

const char* GetSuffixForExtensionCount(size_t extension_count) {}

}  // namespace

// static
std::unique_ptr<ChromeResponsivenessCalculatorDelegate>
ChromeResponsivenessCalculatorDelegate::Create() {}

// static
std::unique_ptr<ChromeResponsivenessCalculatorDelegate>
ChromeResponsivenessCalculatorDelegate::CreateForTesting(
    UsageScenarioDataStore* usage_scenario_data_store) {}

ChromeResponsivenessCalculatorDelegate::
    ~ChromeResponsivenessCalculatorDelegate() = default;

void ChromeResponsivenessCalculatorDelegate::OnMeasurementIntervalEnded() {}

void ChromeResponsivenessCalculatorDelegate::OnResponsivenessEmitted(
    int num_congested_slices,
    int min,
    int exclusive_max,
    size_t buckets) {}

ChromeResponsivenessCalculatorDelegate::ChromeResponsivenessCalculatorDelegate(
    UsageScenarioDataStore* usage_scenario_data_store)
    :{}