Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: compiled/storage/FilterStorage.cpp

Issue 29606600: Issue 5146 - Implement DownloadableSubscription parsing in C++ (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Latest changes Created Dec. 5, 2017, 9:21 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « compiled/storage/FilterStorage.h ('k') | compiled/subscription/DownloadableSubscription.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiled/storage/FilterStorage.cpp
===================================================================
--- a/compiled/storage/FilterStorage.cpp
+++ b/compiled/storage/FilterStorage.cpp
@@ -103,16 +103,26 @@
FilterNotifier::SubscriptionChange(
FilterNotifier::Topic::SUBSCRIPTION_REMOVED,
subscription
);
return true;
}
+void FilterStorage::ClearSubscriptionFilters(Subscription& subscription)
+{
+ subscription.ClearFilters();
+
+ FilterNotifier::SubscriptionChange(
+ FilterNotifier::Topic::SUBSCRIPTION_FILTERS_REPLACED,
+ subscription
+ );
+}
+
bool FilterStorage::MoveSubscription(Subscription& subscription,
const Subscription* insertBefore)
{
int oldPos = IndexOfSubscription(subscription);
assert2(oldPos >= 0, u"Attempt to move a subscription that is not in the list"_str);
if (oldPos == -1)
return false;
« no previous file with comments | « compiled/storage/FilterStorage.h ('k') | compiled/subscription/DownloadableSubscription.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld