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

Unified Diff: libadblockplus-android/jni/JniCallbacks.h

Issue 29424615: Issue 4231 - Fix unstable FilterEngineTest.testSetRemoveFilterChangeCallback (Closed)
Patch Set: changed impl for reading file as bytes array, modified test. AndroidFileSystem now does not resolveā€¦ Created May 29, 2017, 11:26 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
Index: libadblockplus-android/jni/JniCallbacks.h
diff --git a/libadblockplus-android/jni/JniCallbacks.h b/libadblockplus-android/jni/JniCallbacks.h
index 27269b7cb59419fcc46188a56605d0d60bdc2924..1d12274b14da1f84747d9d917d553cffe5cca343 100644
--- a/libadblockplus-android/jni/JniCallbacks.h
+++ b/libadblockplus-android/jni/JniCallbacks.h
@@ -32,7 +32,7 @@ public:
JniCallbackBase(JNIEnv* env, jobject callbackObject);
virtual ~JniCallbackBase();
void LogException(JNIEnv* env, jthrowable throwable) const;
- void CheckAndLogJavaException(JNIEnv* env) const;
+ bool CheckAndLogJavaException(JNIEnv* env) const;
JavaVM* GetJavaVM() const
{
@@ -84,6 +84,18 @@ public:
void operator()(AdblockPlus::LogSystem::LogLevel logLevel, const std::string& message, const std::string& source);
};
+class JniFileSystemCallback : public JniCallbackBase, public AdblockPlus::FileSystem
sergei 2017/08/07 12:49:59 FileSystem interface is removed in the recent liba
+{
+public:
+ JniFileSystemCallback(JNIEnv* env, jobject callbackObject);
+ std::shared_ptr<std::istream> Read(const std::string& path) const;
+ void Write(const std::string& path, std::shared_ptr<std::istream> data);
+ void Move(const std::string& fromPath, const std::string& toPath);
+ void Remove(const std::string& path);
+ AdblockPlus::FileSystem::StatResult Stat(const std::string& path) const;
+ std::string Resolve(const std::string& path) const;
+};
+
class JniShowNotificationCallback : public JniCallbackBase
{
public:

Powered by Google App Engine
This is Rietveld