#include "extensions/browser/quota_service.h"
#include "base/task/single_thread_task_runner.h"
#include "extensions/browser/extension_function.h"
#include "extensions/common/error_utils.h"
#include "extensions/common/extension_id.h"
namespace {
constexpr int kPurgeIntervalInDays = …;
constexpr char kOverQuotaError[] = …;
bool g_purge_disabled_for_testing = …;
}
namespace extensions {
QuotaService::QuotaService() { … }
QuotaService::~QuotaService() { … }
std::string QuotaService::Assess(const ExtensionId& extension_id,
ExtensionFunction* function,
const base::Value::List& args,
const base::TimeTicks& event_time) { … }
QuotaService::ScopedDisablePurgeForTesting::ScopedDisablePurgeForTesting() { … }
QuotaService::ScopedDisablePurgeForTesting::~ScopedDisablePurgeForTesting() { … }
void QuotaService::Purge() { … }
void QuotaLimitHeuristic::Bucket::Reset(const Config& config,
const base::TimeTicks& start) { … }
void QuotaLimitHeuristic::SingletonBucketMapper::GetBucketsForArgs(
const base::Value::List& args,
BucketList* buckets) { … }
QuotaLimitHeuristic::QuotaLimitHeuristic(const Config& config,
std::unique_ptr<BucketMapper> map,
const std::string& name)
: … { … }
QuotaLimitHeuristic::~QuotaLimitHeuristic() = default;
bool QuotaLimitHeuristic::ApplyToArgs(const base::Value::List& args,
const base::TimeTicks& event_time) { … }
std::string QuotaLimitHeuristic::GetError() const { … }
bool QuotaService::TimedLimit::Apply(Bucket* bucket,
const base::TimeTicks& event_time) { … }
}