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.firstrun; | 5 package org.chromium.chrome.browser.firstrun; |
6 | 6 |
7 import android.app.Fragment; | 7 import android.app.Fragment; |
8 import android.content.Context; | 8 import android.content.Context; |
9 import android.text.TextUtils; | 9 import android.text.TextUtils; |
10 | 10 |
11 import org.chromium.chrome.browser.preferences.PrefServiceBridge; | 11 import org.chromium.chrome.browser.preferences.PrefServiceBridge; |
12 import org.chromium.chrome.browser.preferences.privacy.PrivacyPreferencesManager
; | 12 import org.chromium.chrome.browser.preferences.privacy.PrivacyPreferencesManager
; |
13 import org.chromium.chrome.browser.signin.AccountAdder; | 13 import org.chromium.chrome.browser.signin.AccountAdder; |
14 import org.chromium.sync.signin.AccountManagerHelper; | 14 import org.chromium.components.sync.signin.AccountManagerHelper; |
15 | 15 |
16 import java.util.List; | 16 import java.util.List; |
17 | 17 |
18 /** | 18 /** |
19 * Provides preferences glue for FirstRunActivity. | 19 * Provides preferences glue for FirstRunActivity. |
20 */ | 20 */ |
21 public class FirstRunGlueImpl implements FirstRunGlue { | 21 public class FirstRunGlueImpl implements FirstRunGlue { |
22 @Override | 22 @Override |
23 public boolean didAcceptTermsOfService(Context appContext) { | 23 public boolean didAcceptTermsOfService(Context appContext) { |
24 return ToSAckedReceiver.checkAnyUserHasSeenToS(appContext) | 24 return ToSAckedReceiver.checkAnyUserHasSeenToS(appContext) |
(...skipping 23 matching lines...) Expand all Loading... |
48 public int numberOfAccounts(Context appContext) { | 48 public int numberOfAccounts(Context appContext) { |
49 List<String> accountNames = AccountManagerHelper.get(appContext).getGoog
leAccountNames(); | 49 List<String> accountNames = AccountManagerHelper.get(appContext).getGoog
leAccountNames(); |
50 return accountNames == null ? 0 : accountNames.size(); | 50 return accountNames == null ? 0 : accountNames.size(); |
51 } | 51 } |
52 | 52 |
53 @Override | 53 @Override |
54 public void openAccountAdder(Fragment fragment) { | 54 public void openAccountAdder(Fragment fragment) { |
55 AccountAdder.getInstance().addAccount(fragment, AccountAdder.ADD_ACCOUNT
_RESULT); | 55 AccountAdder.getInstance().addAccount(fragment, AccountAdder.ADD_ACCOUNT
_RESULT); |
56 } | 56 } |
57 } | 57 } |
OLD | NEW |