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 package org.chromium.components.signin; | 5 package org.chromium.components.signin; |
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.ContextUtils; | 11 import org.chromium.base.ContextUtils; |
12 import org.chromium.base.annotations.CalledByNative; | 12 import org.chromium.base.annotations.CalledByNative; |
13 import org.chromium.sync.signin.AccountManagerHelper; | 13 import org.chromium.components.sync.signin.AccountManagerHelper; |
14 | 14 |
15 /** | 15 /** |
16 * ChildAccountInfoFetcher for the Android platform. | 16 * ChildAccountInfoFetcher for the Android platform. |
17 * Checks whether an account is a child account from the AccountManager. | 17 * Checks whether an account is a child account from the AccountManager. |
18 */ | 18 */ |
19 public final class ChildAccountInfoFetcher { | 19 public final class ChildAccountInfoFetcher { |
20 private static final String TAG = "cr.signin"; | 20 private static final String TAG = "cr.signin"; |
21 | 21 |
22 private ChildAccountInfoFetcher() { | 22 private ChildAccountInfoFetcher() { |
23 // For static use only. | 23 // For static use only. |
(...skipping 10 matching lines...) Expand all Loading... |
34 @Override | 34 @Override |
35 public void onResult(Boolean isChildAccount) { | 35 public void onResult(Boolean isChildAccount) { |
36 nativeSetIsChildAccount(nativeAccountFetcherService, accountId,
isChildAccount); | 36 nativeSetIsChildAccount(nativeAccountFetcherService, accountId,
isChildAccount); |
37 } | 37 } |
38 }); | 38 }); |
39 } | 39 } |
40 | 40 |
41 private static native void nativeSetIsChildAccount( | 41 private static native void nativeSetIsChildAccount( |
42 long ptrAccountFetcherService, final String accountId, boolean isChi
ldAccount); | 42 long ptrAccountFetcherService, final String accountId, boolean isChi
ldAccount); |
43 } | 43 } |
OLD | NEW |