| 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.chrome.browser.signin; | 5 package org.chromium.chrome.browser.signin; |
| 6 | 6 |
| 7 import android.accounts.Account; | 7 import android.accounts.Account; |
| 8 import android.content.Context; | 8 import android.content.Context; |
| 9 import android.os.AsyncTask; | 9 import android.os.AsyncTask; |
| 10 | 10 |
| 11 import org.chromium.base.Callback; | 11 import org.chromium.base.Callback; |
| 12 import org.chromium.base.Log; | 12 import org.chromium.base.Log; |
| 13 import org.chromium.base.ObserverList; | 13 import org.chromium.base.ObserverList; |
| 14 import org.chromium.base.ThreadUtils; | 14 import org.chromium.base.ThreadUtils; |
| 15 import org.chromium.base.VisibleForTesting; | 15 import org.chromium.base.VisibleForTesting; |
| 16 import org.chromium.base.annotations.JNINamespace; | 16 import org.chromium.base.annotations.JNINamespace; |
| 17 import org.chromium.components.sync.signin.AccountManagerHelper; | 17 import org.chromium.components.signin.AccountManagerHelper; |
| 18 | 18 |
| 19 /** | 19 /** |
| 20 * Android wrapper of AccountTrackerService which provides access from the java l
ayer. | 20 * Android wrapper of AccountTrackerService which provides access from the java l
ayer. |
| 21 * It offers the capability of fetching and seeding system accounts into AccountT
rackerService in C++ | 21 * It offers the capability of fetching and seeding system accounts into AccountT
rackerService in C++ |
| 22 * layer, and notifies observers when it is complete. | 22 * layer, and notifies observers when it is complete. |
| 23 */ | 23 */ |
| 24 @JNINamespace("signin::android") | 24 @JNINamespace("signin::android") |
| 25 public class AccountTrackerService { | 25 public class AccountTrackerService { |
| 26 private static final String TAG = "AccountService"; | 26 private static final String TAG = "AccountService"; |
| 27 private static AccountTrackerService sAccountTrackerService; | 27 private static AccountTrackerService sAccountTrackerService; |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 | 226 |
| 227 private void notifyObserversOnAccountsChange() { | 227 private void notifyObserversOnAccountsChange() { |
| 228 for (OnSystemAccountsSeededListener observer : mSystemAccountsSeedingObs
ervers) { | 228 for (OnSystemAccountsSeededListener observer : mSystemAccountsSeedingObs
ervers) { |
| 229 observer.onSystemAccountsChanged(); | 229 observer.onSystemAccountsChanged(); |
| 230 } | 230 } |
| 231 } | 231 } |
| 232 | 232 |
| 233 private static native void nativeSeedAccountsInfo(String[] gaiaIds, String[]
accountNames); | 233 private static native void nativeSeedAccountsInfo(String[] gaiaIds, String[]
accountNames); |
| 234 private static native boolean nativeAreAccountsSeeded(String[] accountNames)
; | 234 private static native boolean nativeAreAccountsSeeded(String[] accountNames)
; |
| 235 } | 235 } |
| OLD | NEW |