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

Unified Diff: chrome/browser/component_updater/subresource_filter_component_installer.cc

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: chrome/browser/component_updater/subresource_filter_component_installer.cc
diff --git a/chrome/browser/component_updater/subresource_filter_component_installer.cc b/chrome/browser/component_updater/subresource_filter_component_installer.cc
index ad4a4501504a6fc73bd3f56fc23ec37a25176cfe..2eacccd82bb48ce72788bf37008df155747d777f 100644
--- a/chrome/browser/component_updater/subresource_filter_component_installer.cc
+++ b/chrome/browser/component_updater/subresource_filter_component_installer.cc
@@ -12,6 +12,7 @@
#include "base/version.h"
#include "chrome/browser/browser_process.h"
#include "components/component_updater/component_updater_paths.h"
+#include "components/subresource_filter/content/browser/content_ruleset_service_delegate.h"
#include "components/subresource_filter/core/browser/ruleset_service.h"
#include "components/subresource_filter/core/browser/subresource_filter_constants.h"
#include "components/subresource_filter/core/browser/subresource_filter_features.h"
@@ -79,10 +80,12 @@ void SubresourceFilterComponentInstallerTraits::ComponentReady(
install_dir.Append(subresource_filter::kUnindexedRulesetDataFileName);
ruleset_info.license_path =
install_dir.Append(subresource_filter::kUnindexedRulesetLicenseFileName);
- subresource_filter::RulesetService* ruleset_service =
- g_browser_process->subresource_filter_ruleset_service();
- if (ruleset_service)
- ruleset_service->IndexAndStoreAndPublishRulesetIfNeeded(ruleset_info);
+ subresource_filter::ContentRulesetServiceDelegate* ruleset_service_delegate =
+ g_browser_process->subresource_filter_ruleset_service_delegate();
+ if (ruleset_service_delegate) {
+ ruleset_service_delegate->ruleset_service()
+ ->IndexAndStoreAndPublishRulesetIfNeeded(ruleset_info);
+ }
}
// Called during startup and installation before ComponentReady().

Powered by Google App Engine
This is Rietveld 408576698