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

Unified Diff: chrome/browser/subresource_filter/test_ruleset_publisher.cc

Issue 2731283009: Swap ownership of RulesetService and the content delegate (Closed)
Patch Set: engedy review 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: chrome/browser/subresource_filter/test_ruleset_publisher.cc
diff --git a/chrome/browser/subresource_filter/test_ruleset_publisher.cc b/chrome/browser/subresource_filter/test_ruleset_publisher.cc
index ea9c8173738b8f913736186378cfd1ac0a27dd09..c5d3cfd1adb6673a3ee86920f7afa4f42597ca15 100644
--- a/chrome/browser/subresource_filter/test_ruleset_publisher.cc
+++ b/chrome/browser/subresource_filter/test_ruleset_publisher.cc
@@ -8,7 +8,7 @@
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "chrome/browser/browser_process.h"
-#include "components/subresource_filter/content/browser/content_ruleset_service_delegate.h"
+#include "components/subresource_filter/content/browser/content_ruleset_service.h"
#include "components/subresource_filter/core/browser/ruleset_service.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -20,20 +20,20 @@ namespace {
class RulesetDistributionListener {
public:
RulesetDistributionListener()
- : delegate_(static_cast<ContentRulesetServiceDelegate*>(
- g_browser_process->subresource_filter_ruleset_service()
- ->delegate())) {
- delegate_->SetRulesetPublishedCallbackForTesting(run_loop_.QuitClosure());
+ : content_service_(
+ g_browser_process->subresource_filter_ruleset_service()) {
+ content_service_->SetRulesetPublishedCallbackForTesting(
+ run_loop_.QuitClosure());
}
~RulesetDistributionListener() {
- delegate_->SetRulesetPublishedCallbackForTesting(base::Closure());
+ content_service_->SetRulesetPublishedCallbackForTesting(base::Closure());
}
void AwaitDistribution() { run_loop_.Run(); }
private:
- ContentRulesetServiceDelegate* delegate_;
+ ContentRulesetService* content_service_;
base::RunLoop run_loop_;
DISALLOW_COPY_AND_ASSIGN(RulesetDistributionListener);

Powered by Google App Engine
This is Rietveld 408576698