OLD | NEW |
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" |
11 #include "components/invalidation/impl/invalidation_service_android.h" | 11 #include "components/invalidation/impl/invalidation_service_android.h" |
12 #include "components/invalidation/impl/profile_invalidation_provider.h" | 12 #include "components/invalidation/impl/profile_invalidation_provider.h" |
13 #include "jni/InvalidationServiceFactory_jni.h" | 13 #include "jni/InvalidationServiceFactory_jni.h" |
14 | 14 |
| 15 using base::android::JavaParamRef; |
15 using base::android::ScopedJavaLocalRef; | 16 using base::android::ScopedJavaLocalRef; |
16 | 17 |
17 namespace invalidation { | 18 namespace invalidation { |
18 | 19 |
19 ScopedJavaLocalRef<jobject> InvalidationServiceFactoryAndroid::GetForProfile( | 20 ScopedJavaLocalRef<jobject> InvalidationServiceFactoryAndroid::GetForProfile( |
20 JNIEnv* env, | 21 JNIEnv* env, |
21 jclass clazz, | 22 jclass clazz, |
22 jobject j_profile) { | 23 jobject j_profile) { |
23 Profile* profile = ProfileAndroid::FromProfileAndroid(j_profile); | 24 Profile* profile = ProfileAndroid::FromProfileAndroid(j_profile); |
24 invalidation::ProfileInvalidationProvider* provider = | 25 invalidation::ProfileInvalidationProvider* provider = |
(...skipping 25 matching lines...) Expand all Loading... |
50 const JavaParamRef<jclass>& clazz, | 51 const JavaParamRef<jclass>& clazz, |
51 const JavaParamRef<jobject>& j_context) { | 52 const JavaParamRef<jobject>& j_context) { |
52 return InvalidationServiceFactoryAndroid::GetForTest(env, clazz, j_context); | 53 return InvalidationServiceFactoryAndroid::GetForTest(env, clazz, j_context); |
53 } | 54 } |
54 | 55 |
55 bool InvalidationServiceFactoryAndroid::Register(JNIEnv* env) { | 56 bool InvalidationServiceFactoryAndroid::Register(JNIEnv* env) { |
56 return RegisterNativesImpl(env); | 57 return RegisterNativesImpl(env); |
57 } | 58 } |
58 | 59 |
59 } // namespace invalidation | 60 } // namespace invalidation |
OLD | NEW |