Index: components/subresource_filter/content/common/ruleset_dealer.cc |
diff --git a/components/subresource_filter/content/common/ruleset_dealer.cc b/components/subresource_filter/content/common/ruleset_dealer.cc |
index e5e490b09424f58a4d89c7fb1674bbfb0e29a978..9cdbc3fb2008bebf9ec12e5442d3db45f9de49c4 100644 |
--- a/components/subresource_filter/content/common/ruleset_dealer.cc |
+++ b/components/subresource_filter/content/common/ruleset_dealer.cc |
@@ -9,20 +9,26 @@ |
namespace subresource_filter { |
-RulesetDealer::RulesetDealer() = default; |
+RulesetDealer::RulesetDealer() { |
+ DetachFromThread(); |
+} |
+ |
RulesetDealer::~RulesetDealer() = default; |
void RulesetDealer::SetRulesetFile(base::File ruleset_file) { |
+ DCHECK(CalledOnValidThread()); |
DCHECK(ruleset_file.IsValid()); |
ruleset_file_ = std::move(ruleset_file); |
weak_cached_ruleset_.reset(); |
} |
-bool RulesetDealer::IsRulesetAvailable() const { |
+bool RulesetDealer::IsRulesetFileAvailable() const { |
+ DCHECK(CalledOnValidThread()); |
return ruleset_file_.IsValid(); |
} |
scoped_refptr<const MemoryMappedRuleset> RulesetDealer::GetRuleset() { |
+ DCHECK(CalledOnValidThread()); |
if (!ruleset_file_.IsValid()) |
return nullptr; |