Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(428)

Unified Diff: components/subresource_filter/content/browser/content_ruleset_service_delegate.h

Issue 2731283009: Swap ownership of RulesetService and the content delegate (Closed)
Patch Set: Swap ownership of RulesetService and the content delegate Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/subresource_filter/content/browser/content_ruleset_service_delegate.h
diff --git a/components/subresource_filter/content/browser/content_ruleset_service_delegate.h b/components/subresource_filter/content/browser/content_ruleset_service_delegate.h
index ba5338c6fcdf18bbb4b24780a7aa434b667ab625..df4f9e3552868a38a9e19b89d8e2840755ac2635 100644
--- a/components/subresource_filter/content/browser/content_ruleset_service_delegate.h
+++ b/components/subresource_filter/content/browser/content_ruleset_service_delegate.h
@@ -14,6 +14,8 @@
namespace subresource_filter {
+class RulesetService;
+
// The content-layer specific implementation of RulesetServiceDelegate.
//
// Its main responsibility is receiving new versions of subresource filtering
@@ -54,6 +56,9 @@ class ContentRulesetServiceDelegate : public RulesetServiceDelegate,
void PostAfterStartupTask(base::Closure task) override;
void PublishNewRulesetVersion(base::File ruleset_data) override;
+ void set_ruleset_service(std::unique_ptr<RulesetService> ruleset_service);
+ RulesetService* ruleset_service();
+
private:
// content::NotificationObserver:
void Observe(int type,
@@ -64,6 +69,8 @@ class ContentRulesetServiceDelegate : public RulesetServiceDelegate,
base::File ruleset_data_;
base::Closure ruleset_published_callback_;
+ std::unique_ptr<RulesetService> ruleset_service_;
+
DISALLOW_COPY_AND_ASSIGN(ContentRulesetServiceDelegate);
};

Powered by Google App Engine
This is Rietveld 408576698