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

Unified Diff: components/cronet/android/chromium_url_request_context.cc

Issue 981013002: [Cronet] Make sure to only pass the application Context to InitApplicationContext to avoid DCHECK fa (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add ChromiumUrlRequestContext test too Created 5 years, 9 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 | « no previous file | components/cronet/android/cronet_library_loader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
- 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.
« no previous file with comments | « no previous file | components/cronet/android/cronet_library_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698