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 "components/signin/core/browser/child_account_info_fetcher_android.h" | 5 #include "components/signin/core/browser/child_account_info_fetcher_android.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/android/jni_string.h" | 8 #include "base/android/jni_string.h" |
9 #include "components/signin/core/browser/account_fetcher_service.h" | 9 #include "components/signin/core/browser/account_fetcher_service.h" |
10 #include "jni/ChildAccountInfoFetcher_jni.h" | 10 #include "jni/ChildAccountInfoFetcher_jni.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 bool is_child_account) { | 26 bool is_child_account) { |
27 service->SetIsChildAccount(account_id, is_child_account); | 27 service->SetIsChildAccount(account_id, is_child_account); |
28 } | 28 } |
29 | 29 |
30 // static | 30 // static |
31 bool ChildAccountInfoFetcherAndroid::Register(JNIEnv* env) { | 31 bool ChildAccountInfoFetcherAndroid::Register(JNIEnv* env) { |
32 return RegisterNativesImpl(env); | 32 return RegisterNativesImpl(env); |
33 } | 33 } |
34 | 34 |
35 void SetIsChildAccount(JNIEnv* env, | 35 void SetIsChildAccount(JNIEnv* env, |
36 jclass caller, | 36 const JavaParamRef<jclass>& caller, |
37 jlong native_service, | 37 jlong native_service, |
38 jstring j_account_id, | 38 const JavaParamRef<jstring>& j_account_id, |
39 jboolean is_child_account) { | 39 jboolean is_child_account) { |
40 AccountFetcherService* service = | 40 AccountFetcherService* service = |
41 reinterpret_cast<AccountFetcherService*>(native_service); | 41 reinterpret_cast<AccountFetcherService*>(native_service); |
42 ChildAccountInfoFetcherAndroid::SetIsChildAccount( | 42 ChildAccountInfoFetcherAndroid::SetIsChildAccount( |
43 service, base::android::ConvertJavaStringToUTF8(env, j_account_id), | 43 service, base::android::ConvertJavaStringToUTF8(env, j_account_id), |
44 is_child_account); | 44 is_child_account); |
45 } | 45 } |
OLD | NEW |