OLD | NEW |
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 "chrome/browser/interests/android/interests_service.h" | 5 #include "chrome/browser/interests/android/interests_service.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
8 #include "base/android/jni_array.h" | 10 #include "base/android/jni_array.h" |
9 #include "base/android/jni_string.h" | 11 #include "base/android/jni_string.h" |
10 #include "base/android/scoped_java_ref.h" | 12 #include "base/android/scoped_java_ref.h" |
11 #include "chrome/browser/interests/interests_fetcher.h" | 13 #include "chrome/browser/interests/interests_fetcher.h" |
12 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
13 #include "chrome/browser/profiles/profile_android.h" | 15 #include "chrome/browser/profiles/profile_android.h" |
14 #include "jni/InterestsService_jni.h" | 16 #include "jni/InterestsService_jni.h" |
15 | 17 |
16 using base::android::AttachCurrentThread; | 18 using base::android::AttachCurrentThread; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 j_interests.obj()); | 93 j_interests.obj()); |
92 } | 94 } |
93 | 95 |
94 static jlong Init(JNIEnv* env, | 96 static jlong Init(JNIEnv* env, |
95 const JavaParamRef<jobject>& jobj, | 97 const JavaParamRef<jobject>& jobj, |
96 const JavaParamRef<jobject>& jprofile) { | 98 const JavaParamRef<jobject>& jprofile) { |
97 InterestsService* interests_service = | 99 InterestsService* interests_service = |
98 new InterestsService(ProfileAndroid::FromProfileAndroid(jprofile)); | 100 new InterestsService(ProfileAndroid::FromProfileAndroid(jprofile)); |
99 return reinterpret_cast<intptr_t>(interests_service); | 101 return reinterpret_cast<intptr_t>(interests_service); |
100 } | 102 } |
OLD | NEW |