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

Unified Diff: jni/JniCallbacks.h

Issue 5697499218051072: Usage of new API, cleanups (reduced) (Closed)
Patch Set: Removed newly added neetutils code Created April 25, 2014, 9:31 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: jni/JniCallbacks.h
diff --git a/jni/JniCallbacks.h b/jni/JniCallbacks.h
index 38e520bc53732fe3ca0bb68a093426be5f0556f6..198451b490d85e6f7b9cdb52b361dbc37f335288 100644
--- a/jni/JniCallbacks.h
+++ b/jni/JniCallbacks.h
@@ -42,8 +42,8 @@ public:
private:
JavaVM* javaVM;
- JniGlobalReference<jobject>::Ptr callbackObject;
- JniGlobalReference<jclass>::Ptr exceptionLoggerClass;
+ const JniGlobalReference<jobject>::Ptr callbackObject;
+ const JniGlobalReference<jclass>::Ptr exceptionLoggerClass;
};
class JniEventCallback : public JniCallbackBase
@@ -65,6 +65,9 @@ class JniFilterChangeCallback : public JniCallbackBase
public:
JniFilterChangeCallback(JNIEnv* env, jobject callbackObject);
void Callback(const std::string& arg, const AdblockPlus::JsValuePtr jsValue);
+
+private:
+ const JniGlobalReference<jclass>::Ptr jsValueClass;
};
class JniLogSystemCallback : public JniCallbackBase, public AdblockPlus::LogSystem
@@ -74,7 +77,7 @@ public:
void operator()(AdblockPlus::LogSystem::LogLevel logLevel, const std::string& message, const std::string& source);
private:
- JniGlobalReference<jclass>::Ptr logLevelClass;
+ const JniGlobalReference<jclass>::Ptr logLevelClass;
};
class JniWebRequest : public JniCallbackBase, public AdblockPlus::WebRequest
@@ -86,8 +89,8 @@ public:
private:
jobject NewTuple(JNIEnv* env, const std::string& a, const std::string& b) const;
- JniGlobalReference<jclass>::Ptr tupleClass;
- JniGlobalReference<jclass>::Ptr serverResponseClass;
+ const JniGlobalReference<jclass>::Ptr tupleClass;
+ const JniGlobalReference<jclass>::Ptr serverResponseClass;
};
#endif /* JNICALLBACKS_H */
« no previous file with comments | « jni/Debug.h ('k') | jni/JniCallbacks.cpp » ('j') | src/org/adblockplus/ChunkedOutputStream.java » ('J')

Powered by Google App Engine
This is Rietveld