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.sync.signin.AccountManagerHelper; | 17 import org.chromium.components.sync.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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 } | 186 } |
187 | 187 |
188 private void notifyObserversOnAccountsChange() { | 188 private void notifyObserversOnAccountsChange() { |
189 for (OnSystemAccountsSeededListener observer : mSystemAccountsSeedingObs
ervers) { | 189 for (OnSystemAccountsSeededListener observer : mSystemAccountsSeedingObs
ervers) { |
190 observer.onSystemAccountsChanged(); | 190 observer.onSystemAccountsChanged(); |
191 } | 191 } |
192 } | 192 } |
193 | 193 |
194 private static native void nativeSeedAccountsInfo(String[] gaiaIds, String[]
accountNames); | 194 private static native void nativeSeedAccountsInfo(String[] gaiaIds, String[]
accountNames); |
195 } | 195 } |
OLD | NEW |