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 package org.chromium.chrome.browser.childaccounts; | 5 package org.chromium.chrome.browser.childaccounts; |
6 | 6 |
7 import android.accounts.Account; | 7 import android.accounts.Account; |
8 import android.content.Context; | 8 import android.content.Context; |
9 | 9 |
10 import org.chromium.base.Callback; | 10 import org.chromium.base.Callback; |
11 import org.chromium.base.ThreadUtils; | 11 import org.chromium.base.ThreadUtils; |
12 import org.chromium.sync.signin.AccountManagerHelper; | 12 import org.chromium.components.sync.signin.AccountManagerHelper; |
13 | 13 |
14 /** | 14 /** |
15 * This class serves as a simple interface for querying the child account inform
ation. | 15 * This class serves as a simple interface for querying the child account inform
ation. |
16 * It has two methods namely, checkHasChildAccount(...) which is asynchronous an
d queries the | 16 * It has two methods namely, checkHasChildAccount(...) which is asynchronous an
d queries the |
17 * system directly for the information and the synchronous isChildAccount() whic
h asks the native | 17 * system directly for the information and the synchronous isChildAccount() whic
h asks the native |
18 * side assuming it has been set correctly already. | 18 * side assuming it has been set correctly already. |
19 * | 19 * |
20 * The former method is used by ForcedSigninProcessor and FirstRunFlowSequencer
to detect child | 20 * The former method is used by ForcedSigninProcessor and FirstRunFlowSequencer
to detect child |
21 * accounts since the native side is only activated on signing in. | 21 * accounts since the native side is only activated on signing in. |
22 * Once signed in by the ForcedSigninProcessor, the ChildAccountInfoFetcher will
notify the native | 22 * Once signed in by the ForcedSigninProcessor, the ChildAccountInfoFetcher will
notify the native |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 } | 62 } |
63 | 63 |
64 private static native boolean nativeIsChildAccount(); | 64 private static native boolean nativeIsChildAccount(); |
65 | 65 |
66 /** | 66 /** |
67 * If this returns false, Chrome will assume there are no child accounts on
the device, | 67 * If this returns false, Chrome will assume there are no child accounts on
the device, |
68 * and no further checks will be made, which has the effect of a kill switch
. | 68 * and no further checks will be made, which has the effect of a kill switch
. |
69 */ | 69 */ |
70 private static native boolean nativeIsChildAccountDetectionEnabled(); | 70 private static native boolean nativeIsChildAccountDetectionEnabled(); |
71 } | 71 } |
OLD | NEW |