Chromium Code Reviews| 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 1544dde830415d06c7f4e49fe5550f875ff61a0e..9d0e550755663c64cddf2c3db3d599dd1e77eb83 100644 |
| --- a/components/cronet/android/chromium_url_request_context.cc |
| +++ b/components/cronet/android/chromium_url_request_context.cc |
| @@ -63,7 +63,7 @@ bool ChromiumUrlRequestContextRegisterJni(JNIEnv* env) { |
| // Sets global user-agent to be used for all subsequent requests. |
| static jlong CreateRequestContextAdapter(JNIEnv* env, |
| jobject jcaller, |
| - jobject jcontext, |
| + jobject japp_context, |
| jstring juser_agent, |
| jint jlog_level, |
| jstring jconfig) { |
| @@ -86,8 +86,9 @@ static jlong CreateRequestContextAdapter(JNIEnv* env, |
| } |
| // Set application context. |
|
mef
2015/03/06 16:55:55
Do we need to call it at all if ensureInitialized
pauljensen
2015/03/06 17:16:52
ChromiumUrlRequestContext() doesn't call ensureIni
mef
2015/03/06 17:23:14
Good point. I think we do need to call ensureIniti
|
| - base::android::ScopedJavaLocalRef<jobject> scoped_context(env, jcontext); |
| - base::android::InitApplicationContext(env, scoped_context); |
| + base::android::ScopedJavaLocalRef<jobject> scoped_app_context(env, |
| + japp_context); |
| + base::android::InitApplicationContext(env, scoped_app_context); |
| // TODO(mef): MinLogLevel is global, shared by all URLRequestContexts. |
| // Revisit this if each URLRequestContext would need an individual log level. |