Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1723)

Unified Diff: net/proxy/proxy_config_service_android.cc

Issue 1294883002: Revert of [Android] Add a java.lang.System wrapper. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/dns/dns_config_service_posix.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_config_service_android.cc
diff --git a/net/proxy/proxy_config_service_android.cc b/net/proxy/proxy_config_service_android.cc
index e47670d09a79d09e17b6db8f74888696e091030c..66065fb1c665ebb3c006108cd13bc3c7913b2e73 100644
--- a/net/proxy/proxy_config_service_android.cc
+++ b/net/proxy/proxy_config_service_android.cc
@@ -4,7 +4,8 @@
#include "net/proxy/proxy_config_service_android.h"
-#include "base/android/java_system.h"
+#include <sys/system_properties.h>
+
#include "base/android/jni_array.h"
#include "base/android/jni_string.h"
#include "base/basictypes.h"
@@ -155,8 +156,14 @@
}
std::string GetJavaProperty(const std::string& property) {
+ // Use Java System.getProperty to get configuration information.
// TODO(pliard): Conversion to/from UTF8 ok here?
- return base::android::JavaSystem::GetProperty(property);
+ JNIEnv* env = AttachCurrentThread();
+ ScopedJavaLocalRef<jstring> str = ConvertUTF8ToJavaString(env, property);
+ ScopedJavaLocalRef<jstring> result =
+ Java_ProxyChangeListener_getProperty(env, str.obj());
+ return result.is_null() ?
+ std::string() : ConvertJavaStringToUTF8(env, result.obj());
}
void CreateStaticProxyConfig(const std::string& host,
« no previous file with comments | « net/dns/dns_config_service_posix.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698