| Index: components/cronet/android/chromium_url_request_context.cc
|
| diff --git a/components/cronet/android/chromium_url_request_context.cc b/components/cronet/android/chromium_url_request_context.cc
|
| index f870adfe242d0a14d086ad01af4d754e15a13f39..9bf5c421d3a9fc6e27ef0a0386a37626164be861 100644
|
| --- a/components/cronet/android/chromium_url_request_context.cc
|
| +++ b/components/cronet/android/chromium_url_request_context.cc
|
| @@ -38,6 +38,11 @@ class JniURLRequestContextAdapterDelegate
|
| // The documentation says we should detach just before the thread exits.
|
| }
|
|
|
| + virtual void InitProxyConfigService() OVERRIDE {
|
| + JNIEnv* env = base::android::AttachCurrentThread();
|
| + cronet::Java_ChromiumUrlRequestContext_initProxyConfigService(env, owner_);
|
| + }
|
| +
|
| protected:
|
| virtual ~JniURLRequestContextAdapterDelegate() {
|
| JNIEnv* env = base::android::AttachCurrentThread();
|
| @@ -147,4 +152,14 @@ static void StopNetLog(JNIEnv* env,
|
| adapter->StopNetLog();
|
| }
|
|
|
| +// Called on application's main UI thread.
|
| +static void InitProxyConfigServiceOnUIThread(
|
| + JNIEnv* env,
|
| + jobject jcaller,
|
| + jlong urlRequestContextAdapter) {
|
| + URLRequestContextAdapter* adapter =
|
| + reinterpret_cast<URLRequestContextAdapter*>(urlRequestContextAdapter);
|
| + adapter->InitProxyConfigServiceOnUIThread();
|
| +}
|
| +
|
| } // namespace cronet
|
|
|