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

Delta Between Two Patch Sets: jni/JniFilterEngine.cpp

Issue 29329928: Issue 3297 - Fix issues introduced by recent libadblockplus changes and update dependencies (Closed)
Left Patch Set: Created Nov. 10, 2015, 4:32 p.m.
Right Patch Set: MinSDK and copy'n'paste Created Nov. 20, 2015, 12:19 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « jni/JniCallbacks.h ('k') | jni/JniJsEngine.cpp » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 std::string url = JniJavaToStdString(env, jUrl); 110 std::string url = JniJavaToStdString(env, jUrl);
111 111
112 try 112 try
113 { 113 {
114 AdblockPlus::SubscriptionPtr subscription = engine->GetSubscription(url); 114 AdblockPlus::SubscriptionPtr subscription = engine->GetSubscription(url);
115 115
116 return NewJniSubscription(env, subscription); 116 return NewJniSubscription(env, subscription);
117 } 117 }
118 CATCH_THROW_AND_RETURN(env, 0); 118 CATCH_THROW_AND_RETURN(env, 0);
119 } 119 }
120
121 /**
Felix Dahlke 2015/11/20 07:53:52 I don't really get this part - this is the first t
René Jeschke 2015/11/20 12:19:15 Argh, sry, left-over from copy'n'paste for impleme
122 * Sets the callback invoked when a notification should be shown.
123 * @param callback Callback to invoke.
124 */
125 //void SetShowNotificationCallback(const ShowNotificationCallback& value);
126 120
127 static void JNICALL JniShowNextNotification(JNIEnv* env, jclass clazz, jlong ptr , jstring jUrl) 121 static void JNICALL JniShowNextNotification(JNIEnv* env, jclass clazz, jlong ptr , jstring jUrl)
128 { 122 {
129 AdblockPlus::FilterEngine* engine = JniLongToTypePtr<AdblockPlus::FilterEngine >(ptr); 123 AdblockPlus::FilterEngine* engine = JniLongToTypePtr<AdblockPlus::FilterEngine >(ptr);
130 std::string url = JniJavaToStdString(env, jUrl); 124 std::string url = JniJavaToStdString(env, jUrl);
131 125
132 try 126 try
133 { 127 {
134 engine->ShowNextNotification(url); 128 engine->ShowNextNotification(url);
135 } 129 }
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 { (char*)"matches", (char*)"(JLjava/lang/String;" TYP("FilterEngine$ContentTyp e") "[Ljava/lang/String;)" TYP("Filter"), (void*)JniMatchesMany }, 395 { (char*)"matches", (char*)"(JLjava/lang/String;" TYP("FilterEngine$ContentTyp e") "[Ljava/lang/String;)" TYP("Filter"), (void*)JniMatchesMany },
402 { (char*)"getPref", (char*)"(JLjava/lang/String;)" TYP("JsValue"), (void*)JniG etPref }, 396 { (char*)"getPref", (char*)"(JLjava/lang/String;)" TYP("JsValue"), (void*)JniG etPref },
403 { (char*)"setPref", (char*)"(JLjava/lang/String;J)V", (void*)JniSetPref }, 397 { (char*)"setPref", (char*)"(JLjava/lang/String;J)V", (void*)JniSetPref },
404 { (char*)"dtor", (char*)"(J)V", (void*)JniDtor } 398 { (char*)"dtor", (char*)"(J)V", (void*)JniDtor }
405 }; 399 };
406 400
407 extern "C" JNIEXPORT void JNICALL Java_org_adblockplus_libadblockplus_FilterEngi ne_registerNatives(JNIEnv *env, jclass clazz) 401 extern "C" JNIEXPORT void JNICALL Java_org_adblockplus_libadblockplus_FilterEngi ne_registerNatives(JNIEnv *env, jclass clazz)
408 { 402 {
409 env->RegisterNatives(clazz, methods, sizeof(methods) / sizeof(methods[0])); 403 env->RegisterNatives(clazz, methods, sizeof(methods) / sizeof(methods[0]));
410 } 404 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld