summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author vichang <vichang@google.com> 2019-01-08 20:08:43 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2019-01-08 20:08:43 +0000
commitca712e75a9e423daea0583ea449c326b4717cacc (patch)
tree2938c59fec3927955a0f235f3c0179ba7d2ea73a
parenta95eac0c599702e0ce8916b1d95279a32a148fb8 (diff)
parent30428c4d531c155609cb472bf4cf9d3dc060b3c5 (diff)
Merge "Move the implementation of ProxyErrorListener to libpac"
-rw-r--r--packages/services/PacProcessor/jni/com_android_pacprocessor_PacNative.cpp22
1 files changed, 1 insertions, 21 deletions
diff --git a/packages/services/PacProcessor/jni/com_android_pacprocessor_PacNative.cpp b/packages/services/PacProcessor/jni/com_android_pacprocessor_PacNative.cpp
index 846ff2517d12..a40cf1c06d07 100644
--- a/packages/services/PacProcessor/jni/com_android_pacprocessor_PacNative.cpp
+++ b/packages/services/PacProcessor/jni/com_android_pacprocessor_PacNative.cpp
@@ -27,23 +27,7 @@
namespace android {
-class ProxyErrorLogger : public net::ProxyErrorListener {
-public:
- ~ProxyErrorLogger() {
-
- }
- void AlertMessage(String16 message) {
- String8 str(message);
- ALOGD("Alert: %s", str.string());
- }
- void ErrorMessage(String16 message) {
- String8 str(message);
- ALOGE("Error: %s", str.string());
- }
-};
-
net::ProxyResolverV8* proxyResolver = NULL;
-ProxyErrorLogger* logger = NULL;
bool pacSet = false;
String16 jstringToString16(JNIEnv* env, jstring jstr) {
@@ -64,9 +48,7 @@ jstring string16ToJstring(JNIEnv* env, String16 string) {
static jboolean com_android_pacprocessor_PacNative_createV8ParserNativeLocked(JNIEnv* /* env */,
jobject) {
if (proxyResolver == NULL) {
- logger = new ProxyErrorLogger();
- proxyResolver = new net::ProxyResolverV8(net::ProxyResolverJSBindings::CreateDefault(),
- logger);
+ proxyResolver = new net::ProxyResolverV8(net::ProxyResolverJSBindings::CreateDefault());
pacSet = false;
return JNI_FALSE;
}
@@ -76,9 +58,7 @@ static jboolean com_android_pacprocessor_PacNative_createV8ParserNativeLocked(JN
static jboolean com_android_pacprocessor_PacNative_destroyV8ParserNativeLocked(JNIEnv* /* env */,
jobject) {
if (proxyResolver != NULL) {
- delete logger;
delete proxyResolver;
- logger = NULL;
proxyResolver = NULL;
return JNI_FALSE;
}