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

Unified Diff: include/AdblockPlus/FilterEngine.h

Issue 29419607: Issue 5163 - Reduce the use of FilterPtr (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Patch Set: Created April 21, 2017, 1:04 p.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 | « no previous file | shell/src/FiltersCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/AdblockPlus/FilterEngine.h
===================================================================
--- a/include/AdblockPlus/FilterEngine.h
+++ b/include/AdblockPlus/FilterEngine.h
@@ -134,17 +134,17 @@
* @param value JavaScript subscription object.
*/
Subscription(JsValue&& value);
};
/**
* Shared smart pointer to a `Filter` instance.
*/
- typedef std::shared_ptr<Filter> FilterPtr;
+ typedef std::unique_ptr<Filter> FilterPtr;
/**
* Shared smart pointer to a `Subscription` instance.
*/
typedef std::shared_ptr<Subscription> SubscriptionPtr;
/**
* Main component of libadblockplus.
@@ -280,30 +280,30 @@
bool IsFirstRun() const;
/**
* Retrieves a filter object from its text representation.
* @param text Text representation of the filter,
* see https://adblockplus.org/en/filters.
* @return New `Filter` instance.
*/
- FilterPtr GetFilter(const std::string& text) const;
+ Filter GetFilter(const std::string& text) const;
/**
* Retrieves a subscription object for the supplied URL.
* @param url Subscription URL.
* @return New `Subscription` instance.
*/
SubscriptionPtr GetSubscription(const std::string& url) const;
/**
* Retrieves the list of custom filters.
* @return List of custom filters.
*/
- std::vector<FilterPtr> GetListedFilters() const;
+ std::vector<Filter> GetListedFilters() const;
/**
* Retrieves all subscriptions.
* @return List of subscriptions.
*/
std::vector<SubscriptionPtr> GetListedSubscriptions() const;
/**
« no previous file with comments | « no previous file | shell/src/FiltersCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld