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

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

Issue 726013002: [Cronet] Hook up library loader, system proxy and network change notifier to async api. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Self review, cl format Created 5 years, 12 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/cronet_url_request_context.cc
diff --git a/components/cronet/android/cronet_url_request_context.cc b/components/cronet/android/cronet_url_request_context.cc
index a9b6014217c7ffd110f42fa9a90a4eea5a3227da..b4592fc1d42ddb2acadc6512c9a9b44ff9a507e0 100644
--- a/components/cronet/android/cronet_url_request_context.cc
+++ b/components/cronet/android/cronet_url_request_context.cc
@@ -106,4 +106,16 @@ static jint SetMinLogLevel(JNIEnv* env, jobject jcaller, jint jlog_level) {
return old_log_level;
}
+// Called on application's main Java thread.
+static void InitRequestContextOnMainThread(JNIEnv* env,
+ jobject jcaller,
+ jlong jurl_request_context_adapter) {
+ if (jurl_request_context_adapter == 0)
+ return;
+ CronetURLRequestContextAdapter* context_adapter =
+ reinterpret_cast<CronetURLRequestContextAdapter*>(
+ jurl_request_context_adapter);
+ context_adapter->InitRequestContextOnMainThread();
+}
+
} // namespace cronet

Powered by Google App Engine
This is Rietveld 408576698