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

Unified Diff: include/AdblockPlus/FilterEngine.h

Issue 29435650: Issue 5182, 4688 - improve IsSubscriptionDowloadAllowedCallback and corresponding tests (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: Created May 10, 2017, 4:55 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 | src/FilterEngine.cpp » ('j') | test/FilterEngine.cpp » ('J')
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 bbfb2e1202ebe7f0eb41d631bade10dd8b102d46..537142f8c97d39b572a6bcff6ce76644fccecec1 100644
--- a/include/AdblockPlus/FilterEngine.h
+++ b/include/AdblockPlus/FilterEngine.h
@@ -255,10 +255,11 @@ namespace AdblockPlus
typedef std::function<void(Notification&&)> ShowNotificationCallback;
/**
- * Callback function returning false when current connection is not
- * allowedConnectionType, e.g. because it is a metered connection.
+ * Asynchronous callback function passing false when current connection
+ * type does not correspond to allowedConnectionType, e.g. because it is a
+ * metered connection.
*/
- typedef std::function<bool(const std::string* allowedConnectionType)> IsConnectionAllowedCallback;
+ typedef std::function<void(const std::string* allowedConnectionType, const std::function<void(bool)>&)> IsConnectionAllowedAsyncCallback;
/**
* FilterEngine creation parameters.
@@ -271,11 +272,11 @@ namespace AdblockPlus
*/
Prefs preconfiguredPrefs;
/**
- * `AdblockPlus::FilterEngine::IsConnectionAllowedCallback` a callback
- * checking whether the request from Adblock Plus should be blocked on
- * the current connection.
+ * A callback of `AdblockPlus::FilterEngine::IsConnectionAllowedAsyncCallback` type
+ * checking whether the request to download a subscription from Adblock Plus may be performed
+ * on the current connection.
*/
- IsConnectionAllowedCallback isConnectionAllowedCallback;
+ IsConnectionAllowedAsyncCallback isSubscriptionDowloadAllowedCallback;
};
/**
« no previous file with comments | « no previous file | src/FilterEngine.cpp » ('j') | test/FilterEngine.cpp » ('J')

Powered by Google App Engine
This is Rietveld