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

Unified Diff: include/AdblockPlus/FilterEngine.h

Issue 29422625: Issue 5189 - use r-value references when objects should be transferred (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: Created April 26, 2017, 2:14 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 | include/AdblockPlus/JsEngine.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/AdblockPlus/FilterEngine.h
diff --git a/include/AdblockPlus/FilterEngine.h b/include/AdblockPlus/FilterEngine.h
index 970821b8a796ab964ee3e020b381c3005cafaa0e..a058bdbe55c4811696e29768d2f06fd517d26812 100644
--- a/include/AdblockPlus/FilterEngine.h
+++ b/include/AdblockPlus/FilterEngine.h
@@ -228,7 +228,7 @@ namespace AdblockPlus
* for the full list).
* The second parameter is the filter/subscription object affected, if any.
*/
- typedef std::function<void(const std::string&, const JsValue&)> FilterChangeCallback;
+ typedef std::function<void(const std::string&, JsValue&&)> FilterChangeCallback;
/**
* Container of name-value pairs representing a set of preferences.
@@ -239,7 +239,7 @@ namespace AdblockPlus
* Callback type invoked when a new notification should be shown.
* The parameter is the Notification object to be shown.
*/
- typedef std::function<void(Notification&)> ShowNotificationCallback;
+ typedef std::function<void(Notification&&)> ShowNotificationCallback;
/**
* Callback function returning false when current connection is not
@@ -556,12 +556,7 @@ namespace AdblockPlus
FilterPtr CheckFilterMatch(const std::string& url,
ContentTypeMask contentTypeMask,
const std::string& documentUrl) const;
- void UpdateAvailable(const UpdateAvailableCallback& callback, const JsValueList& params) const;
- void UpdateCheckDone(const std::string& eventName,
- const UpdateCheckDoneCallback& callback, const JsValueList& params);
- void FilterChanged(const FilterChangeCallback& callback, const JsValueList& params) const;
- void ShowNotification(const ShowNotificationCallback& callback,
- const JsValueList& param) const;
+ void FilterChanged(const FilterChangeCallback& callback, JsValueList&& params) const;
FilterPtr GetWhitelistingFilter(const std::string& url,
ContentTypeMask contentTypeMask, const std::string& documentUrl) const;
FilterPtr GetWhitelistingFilter(const std::string& url,
« no previous file with comments | « no previous file | include/AdblockPlus/JsEngine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld