#include "components/subresource_filter/core/browser/verified_ruleset_dealer.h"
#include <utility>
#include "base/check.h"
#include "base/files/file.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/location.h"
#include "base/not_fatal_until.h"
#include "base/notreached.h"
#include "base/task/sequenced_task_runner.h"
#include "base/trace_event/trace_event.h"
#include "components/subresource_filter/core/common/indexed_ruleset.h"
#include "components/subresource_filter/core/common/memory_mapped_ruleset.h"
namespace subresource_filter {
VerifiedRulesetDealer::VerifiedRulesetDealer(const RulesetConfig& config)
: … { … }
VerifiedRulesetDealer::~VerifiedRulesetDealer() = default;
RulesetFilePtr VerifiedRulesetDealer::OpenAndSetRulesetFile(
int expected_checksum,
const base::FilePath& file_path) { … }
void VerifiedRulesetDealer::SetRulesetFile(base::File ruleset_file) { … }
scoped_refptr<const MemoryMappedRuleset> VerifiedRulesetDealer::GetRuleset() { … }
VerifiedRulesetDealer::Handle::Handle(
scoped_refptr<base::SequencedTaskRunner> task_runner,
const RulesetConfig& config)
: … { … }
VerifiedRulesetDealer::Handle::~Handle() { … }
void VerifiedRulesetDealer::Handle::GetDealerAsync(
base::OnceCallback<void(VerifiedRulesetDealer*)> callback) { … }
void VerifiedRulesetDealer::Handle::TryOpenAndSetRulesetFile(
const base::FilePath& path,
int expected_checksum,
base::OnceCallback<void(RulesetFilePtr)> callback) { … }
VerifiedRuleset::VerifiedRuleset() { … }
VerifiedRuleset::~VerifiedRuleset() { … }
void VerifiedRuleset::Initialize(VerifiedRulesetDealer* dealer) { … }
VerifiedRuleset::Handle::Handle(VerifiedRulesetDealer::Handle* dealer_handle)
: … { … }
VerifiedRuleset::Handle::~Handle() { … }
void VerifiedRuleset::Handle::GetRulesetAsync(
base::OnceCallback<void(VerifiedRuleset*)> callback) { … }
}