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

Unified Diff: include/AdblockPlus/JsEngine.h

Issue 29424786: Issue 5182 - fix IsConnectionAllowed (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: Created April 28, 2017, 2:42 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 | lib/compat.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/AdblockPlus/JsEngine.h
diff --git a/include/AdblockPlus/JsEngine.h b/include/AdblockPlus/JsEngine.h
index 55f7e04576fff13af1011158d508bc6cac3d91f4..f54b98febd3d256ac88fa027c572aae948bd24bc 100644
--- a/include/AdblockPlus/JsEngine.h
+++ b/include/AdblockPlus/JsEngine.h
@@ -102,12 +102,6 @@ namespace AdblockPlus
typedef std::function<void(JsValueList&& params)> EventCallback;
/**
- * Callback function returning false when current connection is not allowed
- * e.g. because it is a metered connection.
- */
- typedef std::function<bool()> IsConnectionAllowedCallback;
-
- /**
* Maps events to callback functions.
*/
typedef std::map<std::string, EventCallback> EventMap;
@@ -282,19 +276,6 @@ namespace AdblockPlus
void SetWebRequest(const WebRequestPtr& val);
/**
- * Registers the callback function to check whether current connection is
- * allowed for network requests.
- * @param callback callback function.
- */
- void SetIsConnectionAllowedCallback(const IsConnectionAllowedCallback& callback);
-
- /**
- * Checks whether current connection is allowed. If
- * IsConnectionAllowedCallback is not set then then it returns true.
- */
- bool IsConnectionAllowed() const;
-
- /**
* @see `SetLogSystem()`.
*/
LogSystemPtr GetLogSystem() const;
@@ -340,8 +321,6 @@ namespace AdblockPlus
std::unique_ptr<v8::Persistent<v8::Context>> context;
EventMap eventCallbacks;
std::mutex eventCallbacksMutex;
- mutable std::mutex isConnectionAllowedMutex;
- IsConnectionAllowedCallback isConnectionAllowed;
JsWeakValuesLists jsWeakValuesLists;
std::mutex jsWeakValuesListsMutex;
TimerPtr timer;
« no previous file with comments | « no previous file | lib/compat.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld