Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/firstrun/ToSAckedReceiver.java

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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.content.BroadcastReceiver; 7 import android.content.BroadcastReceiver;
8 import android.content.Context; 8 import android.content.Context;
9 import android.content.Intent; 9 import android.content.Intent;
10 import android.content.SharedPreferences; 10 import android.content.SharedPreferences;
11 import android.os.Bundle; 11 import android.os.Bundle;
12 12
13 import org.chromium.base.ContextUtils; 13 import org.chromium.base.ContextUtils;
14 import org.chromium.sync.signin.AccountManagerHelper; 14 import org.chromium.components.sync.signin.AccountManagerHelper;
15 15
16 import java.util.HashSet; 16 import java.util.HashSet;
17 import java.util.List; 17 import java.util.List;
18 import java.util.Set; 18 import java.util.Set;
19 19
20 /** 20 /**
21 * This receiver is notified when a user goes through the Setup Wizard and ackno wledges 21 * This receiver is notified when a user goes through the Setup Wizard and ackno wledges
22 * the Chrome ToS so that we don't show the ToS string during our first run. 22 * the Chrome ToS so that we don't show the ToS string during our first run.
23 */ 23 */
24 public class ToSAckedReceiver extends BroadcastReceiver { 24 public class ToSAckedReceiver extends BroadcastReceiver {
(...skipping 28 matching lines...) Expand all
53 if (toSAckedAccounts == null || toSAckedAccounts.isEmpty()) return false ; 53 if (toSAckedAccounts == null || toSAckedAccounts.isEmpty()) return false ;
54 AccountManagerHelper accountHelper = AccountManagerHelper.get(context); 54 AccountManagerHelper accountHelper = AccountManagerHelper.get(context);
55 List<String> accountNames = accountHelper.getGoogleAccountNames(); 55 List<String> accountNames = accountHelper.getGoogleAccountNames();
56 if (accountNames.isEmpty()) return false; 56 if (accountNames.isEmpty()) return false;
57 for (int k = 0; k < accountNames.size(); k++) { 57 for (int k = 0; k < accountNames.size(); k++) {
58 if (toSAckedAccounts.contains(accountNames.get(k))) return true; 58 if (toSAckedAccounts.contains(accountNames.get(k))) return true;
59 } 59 }
60 return false; 60 return false;
61 } 61 }
62 } 62 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698