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

Unified Diff: libadblockplus-android/jni/JniIsAllowedConnectionTypeCallback.cpp

Issue 29533572: Issue 5556 - Update to use libadblockplus revision hg:566f64c8a2a8 (Closed) Base URL: github.com:abby-sergz/libadblockplus-android.git
Patch Set: Created Sept. 1, 2017, 9:41 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/JniIsAllowedConnectionTypeCallback.cpp
diff --git a/libadblockplus-android/jni/JniIsAllowedConnectionTypeCallback.cpp b/libadblockplus-android/jni/JniIsAllowedConnectionTypeCallback.cpp
index 5d5bec8f457b29c343647b03eaab8568cb88926c..86358f74717d45a89c03b21e50fee9836c6d459f 100644
--- a/libadblockplus-android/jni/JniIsAllowedConnectionTypeCallback.cpp
+++ b/libadblockplus-android/jni/JniIsAllowedConnectionTypeCallback.cpp
@@ -18,23 +18,6 @@
#include "JniCallbacks.h"
#include "Utils.h"
-static jlong JNICALL JniCtor(JNIEnv* env, jclass clazz, jobject callbackObject)
-{
- try
- {
- JniIsAllowedConnectionTypeCallback* callback =
- new JniIsAllowedConnectionTypeCallback(env, callbackObject);
-
- return JniPtrToLong(callback);
- }
- CATCH_THROW_AND_RETURN(env, 0)
-}
-
-static void JNICALL JniDtor(JNIEnv* env, jclass clazz, jlong ptr)
-{
- delete JniLongToTypePtr<JniIsAllowedConnectionTypeCallback>(ptr);
-}
-
JniIsAllowedConnectionTypeCallback::JniIsAllowedConnectionTypeCallback(JNIEnv* env,
jobject callbackObject)
: JniCallbackBase(env, callbackObject)
@@ -58,15 +41,4 @@ bool JniIsAllowedConnectionTypeCallback::Callback(const std::string* allowedConn
CheckAndLogJavaException(*env);
return result;
-}
-
-static JNINativeMethod methods[] =
-{
- { (char*)"ctor", (char*)"(Ljava/lang/Object;)J", (void*)JniCtor },
- { (char*)"dtor", (char*)"(J)V", (void*)JniDtor }
-};
-
-extern "C" JNIEXPORT void JNICALL Java_org_adblockplus_libadblockplus_IsAllowedConnectionCallback_registerNatives(JNIEnv *env, jclass clazz)
-{
- env->RegisterNatives(clazz, methods, sizeof(methods) / sizeof(methods[0]));
-}
+}

Powered by Google App Engine
This is Rietveld