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

Side by Side Diff: chrome/browser/invalidation/invalidation_service_factory_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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/invalidation/invalidation_service_factory_android.h" 5 #include "chrome/browser/invalidation/invalidation_service_factory_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "chrome/browser/invalidation/profile_invalidation_provider_factory.h" 8 #include "chrome/browser/invalidation/profile_invalidation_provider_factory.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/profiles/profile_android.h" 10 #include "chrome/browser/profiles/profile_android.h"
(...skipping 20 matching lines...) Expand all
31 31
32 ScopedJavaLocalRef<jobject> InvalidationServiceFactoryAndroid::GetForTest( 32 ScopedJavaLocalRef<jobject> InvalidationServiceFactoryAndroid::GetForTest(
33 JNIEnv* env, 33 JNIEnv* env,
34 jclass clazz, 34 jclass clazz,
35 jobject j_context) { 35 jobject j_context) {
36 InvalidationServiceAndroid* service_android = 36 InvalidationServiceAndroid* service_android =
37 new InvalidationServiceAndroid(j_context); 37 new InvalidationServiceAndroid(j_context);
38 return ScopedJavaLocalRef<jobject>(service_android->java_ref_); 38 return ScopedJavaLocalRef<jobject>(service_android->java_ref_);
39 } 39 }
40 40
41 ScopedJavaLocalRef<jobject> GetForProfile(JNIEnv* env, 41 ScopedJavaLocalRef<jobject> GetForProfile(
42 jclass clazz, 42 JNIEnv* env,
43 jobject j_profile) { 43 const JavaParamRef<jclass>& clazz,
44 const JavaParamRef<jobject>& j_profile) {
44 return InvalidationServiceFactoryAndroid::GetForProfile(env, clazz, 45 return InvalidationServiceFactoryAndroid::GetForProfile(env, clazz,
45 j_profile); 46 j_profile);
46 } 47 }
47 48
48 ScopedJavaLocalRef<jobject> GetForTest(JNIEnv* env, 49 ScopedJavaLocalRef<jobject> GetForTest(JNIEnv* env,
49 jclass clazz, 50 const JavaParamRef<jclass>& clazz,
50 jobject j_context) { 51 const JavaParamRef<jobject>& j_context) {
51 return InvalidationServiceFactoryAndroid::GetForTest(env, clazz, j_context); 52 return InvalidationServiceFactoryAndroid::GetForTest(env, clazz, j_context);
52 } 53 }
53 54
54 bool InvalidationServiceFactoryAndroid::Register(JNIEnv* env) { 55 bool InvalidationServiceFactoryAndroid::Register(JNIEnv* env) {
55 return RegisterNativesImpl(env); 56 return RegisterNativesImpl(env);
56 } 57 }
57 58
58 } // namespace invalidation 59 } // namespace invalidation
OLDNEW
« no previous file with comments | « chrome/browser/dom_distiller/tab_utils_android.cc ('k') | chrome/browser/media/android/remote/record_cast_action.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698