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

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

Issue 1312153003: jni_generator: Pass object parameters as JavaParamRef. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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/cronet_url_request_context_adapter.cc
diff --git a/components/cronet/android/cronet_url_request_context_adapter.cc b/components/cronet/android/cronet_url_request_context_adapter.cc
index 0cb2892a3f789dbd6f87c6f53ad7a51eeb32c06a..c1008498cb223ed398ca15203479bf8005a80ed3 100644
--- a/components/cronet/android/cronet_url_request_context_adapter.cc
+++ b/components/cronet/android/cronet_url_request_context_adapter.cc
@@ -398,8 +398,8 @@ base::Thread* CronetURLRequestContextAdapter::GetFileThread() {
// Creates RequestContextAdater if config is valid URLRequestContextConfig,
// returns 0 otherwise.
static jlong CreateRequestContextAdapter(JNIEnv* env,
- jclass jcaller,
- jstring jconfig) {
+ const JavaParamRef<jclass>& jcaller,
+ const JavaParamRef<jstring>& jconfig) {
std::string config_string =
base::android::ConvertJavaStringToUTF8(env, jconfig);
scoped_ptr<URLRequestContextConfig> context_config(
@@ -412,7 +412,9 @@ static jlong CreateRequestContextAdapter(JNIEnv* env,
return reinterpret_cast<jlong>(context_adapter);
}
-static jint SetMinLogLevel(JNIEnv* env, jclass jcaller, jint jlog_level) {
+static jint SetMinLogLevel(JNIEnv* env,
+ const JavaParamRef<jclass>& jcaller,
+ jint jlog_level) {
jint old_log_level = static_cast<jint>(logging::GetMinLogLevel());
// MinLogLevel is global, shared by all URLRequestContexts.
logging::SetMinLogLevel(static_cast<int>(jlog_level));

Powered by Google App Engine
This is Rietveld 408576698