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

Side by Side Diff: net/test/embedded_test_server/android/embedded_test_server_android.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 unified diff | Download patch
« no previous file with comments | « net/cert/x509_util_android.cc ('k') | remoting/client/jni/chromoting_jni_runtime.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/test/embedded_test_server/android/embedded_test_server_android.h" 5 #include "net/test/embedded_test_server/android/embedded_test_server_android.h"
6 6
7 #include "base/android/jni_string.h" 7 #include "base/android/jni_string.h"
8 #include "base/android/scoped_java_ref.h" 8 #include "base/android/scoped_java_ref.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 jstring jdirectory_path) { 50 jstring jdirectory_path) {
51 const base::FilePath directory( 51 const base::FilePath directory(
52 base::android::ConvertJavaStringToUTF8(env, jdirectory_path)); 52 base::android::ConvertJavaStringToUTF8(env, jdirectory_path));
53 test_server_.ServeFilesFromDirectory(directory); 53 test_server_.ServeFilesFromDirectory(directory);
54 } 54 }
55 55
56 void EmbeddedTestServerAndroid::Destroy(JNIEnv* env, jobject jobj) { 56 void EmbeddedTestServerAndroid::Destroy(JNIEnv* env, jobject jobj) {
57 delete this; 57 delete this;
58 } 58 }
59 59
60 static void Init(JNIEnv* env, jobject jobj) { 60 static void Init(JNIEnv* env, const JavaParamRef<jobject>& jobj) {
61 TRACE_EVENT0("native", "EmbeddedTestServerAndroid::Init"); 61 TRACE_EVENT0("native", "EmbeddedTestServerAndroid::Init");
62 new EmbeddedTestServerAndroid(env, jobj); 62 new EmbeddedTestServerAndroid(env, jobj);
63 } 63 }
64 64
65 // static 65 // static
66 bool EmbeddedTestServerAndroid::RegisterEmbeddedTestServerAndroid(JNIEnv* env) { 66 bool EmbeddedTestServerAndroid::RegisterEmbeddedTestServerAndroid(JNIEnv* env) {
67 return RegisterNativesImpl(env); 67 return RegisterNativesImpl(env);
68 } 68 }
69 69
70 } // namespace test_server 70 } // namespace test_server
71 } // namespace net 71 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/x509_util_android.cc ('k') | remoting/client/jni/chromoting_jni_runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698