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/supervised_user/child_accounts/child_account_service_an
droid.h" | 5 #include "chrome/browser/supervised_user/child_accounts/child_account_service_an
droid.h" |
6 | 6 |
7 #include "chrome/browser/browser_process.h" | 7 #include "chrome/browser/browser_process.h" |
8 #include "chrome/browser/profiles/profile_manager.h" | 8 #include "chrome/browser/profiles/profile_manager.h" |
9 #include "chrome/browser/supervised_user/child_accounts/child_account_service.h" | 9 #include "chrome/browser/supervised_user/child_accounts/child_account_service.h" |
10 #include "jni/ChildAccountService_jni.h" | 10 #include "jni/ChildAccountService_jni.h" |
11 | 11 |
| 12 using base::android::JavaParamRef; |
| 13 |
12 jboolean IsChildAccountDetectionEnabled(JNIEnv* env, | 14 jboolean IsChildAccountDetectionEnabled(JNIEnv* env, |
13 const JavaParamRef<jclass>& jcaller) { | 15 const JavaParamRef<jclass>& jcaller) { |
14 return ChildAccountService::IsChildAccountDetectionEnabled(); | 16 return ChildAccountService::IsChildAccountDetectionEnabled(); |
15 } | 17 } |
16 | 18 |
17 jboolean IsChildAccount(JNIEnv* env, const JavaParamRef<jclass>& jcaller) { | 19 jboolean IsChildAccount(JNIEnv* env, const JavaParamRef<jclass>& jcaller) { |
18 ProfileManager* profile_manager = g_browser_process->profile_manager(); | 20 ProfileManager* profile_manager = g_browser_process->profile_manager(); |
19 return profile_manager->GetLastUsedProfile()->IsChild(); | 21 return profile_manager->GetLastUsedProfile()->IsChild(); |
20 } | 22 } |
21 | 23 |
22 bool RegisterChildAccountService(JNIEnv* env) { | 24 bool RegisterChildAccountService(JNIEnv* env) { |
23 return RegisterNativesImpl(env); | 25 return RegisterNativesImpl(env); |
24 } | 26 } |
OLD | NEW |