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

Unified Diff: components/cronet/android/java/src/org/chromium/net/ChromiumUrlRequestContext.java

Issue 624443003: Setup ProxyConfigServiceAndroid in Cronet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
Index: components/cronet/android/java/src/org/chromium/net/ChromiumUrlRequestContext.java
diff --git a/components/cronet/android/java/src/org/chromium/net/ChromiumUrlRequestContext.java b/components/cronet/android/java/src/org/chromium/net/ChromiumUrlRequestContext.java
index 4c3dd44ffca2552a946ab95e2b1425d0d2c81e1f..43be580447468a300616ca26c344290d9d56680d 100644
--- a/components/cronet/android/java/src/org/chromium/net/ChromiumUrlRequestContext.java
+++ b/components/cronet/android/java/src/org/chromium/net/ChromiumUrlRequestContext.java
@@ -6,6 +6,8 @@ package org.chromium.net;
import android.content.Context;
import android.os.ConditionVariable;
+import android.os.Handler;
+import android.os.Looper;
import android.os.Process;
import android.util.Log;
@@ -93,6 +95,17 @@ public class ChromiumUrlRequestContext {
mStarted.open();
}
+ @CalledByNative
+ private void initProxyConfigService() {
+ Runnable task = new Runnable() {
+ public void run() {
+ nativeInitProxyConfigServiceOnUIThread(
xunjieli 2014/10/01 19:51:36 nit: indent. will change in next patch.
+ mChromiumUrlRequestContextAdapter);
+ }
+ };
+ new Handler(Looper.getMainLooper()).post(task);
+ }
+
@Override
protected void finalize() throws Throwable {
nativeReleaseRequestContextAdapter(mChromiumUrlRequestContextAdapter);
@@ -135,4 +148,6 @@ public class ChromiumUrlRequestContext {
long chromiumUrlRequestContextAdapter, String fileName);
private native void nativeStopNetLog(long chromiumUrlRequestContextAdapter);
+ private native void nativeInitProxyConfigServiceOnUIThread(
+ long chromiumUrlRequestContextAdapter);
}

Powered by Google App Engine
This is Rietveld 408576698