chromium/components/safe_browsing/content/browser/triggers/trigger_throttler.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/safe_browsing/content/browser/triggers/trigger_throttler.h"

#include "base/containers/contains.h"
#include "base/metrics/field_trial_params.h"
#include "base/ranges/algorithm.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/time/default_clock.h"
#include "base/time/time.h"
#include "base/values.h"
#include "components/prefs/pref_service.h"
#include "components/safe_browsing/core/common/features.h"
#include "components/safe_browsing/core/common/safe_browsing_prefs.h"

namespace safe_browsing {
const size_t kAdSamplerTriggerDefaultQuota =;
const size_t kSuspiciousSiteTriggerDefaultQuota =;
const char kSuspiciousSiteTriggerQuotaParam[] =;

namespace {
const size_t kUnlimitedTriggerQuota =;
constexpr base::TimeDelta kOneDayTimeDelta =;

void ParseTriggerTypeAndQuotaParam(
    std::vector<TriggerTypeAndQuotaItem>* trigger_type_and_quota_list) {}

// Looks in |trigger_quota_list| for |trigger_type|. If found, sets |out_quota|
// to the configured quota, and returns true. If not found, returns false.
bool TryFindQuotaForTrigger(
    const TriggerType trigger_type,
    const std::vector<TriggerTypeAndQuotaItem>& trigger_quota_list,
    size_t* out_quota) {}

}  // namespace

TriggerThrottler::TriggerThrottler(PrefService* local_state_prefs)
    :{}

TriggerThrottler::~TriggerThrottler() {}

void TriggerThrottler::SetClockForTesting(base::Clock* test_clock) {}

bool TriggerThrottler::TriggerCanFire(const TriggerType trigger_type) const {}

void TriggerThrottler::TriggerFired(const TriggerType trigger_type) {}

void TriggerThrottler::CleanupOldEvents() {}

void TriggerThrottler::LoadTriggerEventsFromPref() {}

void TriggerThrottler::WriteTriggerEventsToPref() {}

size_t TriggerThrottler::GetDailyQuotaForTrigger(
    const TriggerType trigger_type) const {}

void TriggerThrottler::ResetPrefsForTesting(PrefService* local_state_prefs) {}

}  // namespace safe_browsing