summaryrefslogtreecommitdiffstats
path: root/sync
diff options
context:
space:
mode:
authornyquist@chromium.org <nyquist@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-21 12:13:25 +0000
committernyquist@chromium.org <nyquist@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-21 12:13:25 +0000
commitd529839c44726db1bfa9cff92f8b4b8be790ca4c (patch)
treed13d15df719626db9fd52590c3e3d2e8313c1df6 /sync
parent0e8140a9e2ca1e157467e852294b35cb9adca4fa (diff)
downloadchromium_src-d529839c44726db1bfa9cff92f8b4b8be790ca4c.zip
chromium_src-d529839c44726db1bfa9cff92f8b4b8be790ca4c.tar.gz
chromium_src-d529839c44726db1bfa9cff92f8b4b8be790ca4c.tar.bz2
[sync] Remove deprecated SyncStatusHelper methods
https://codereview.chromium.org/12873002/ added a new class to be used for signin-related tasks. Downstream has now moved to use the new methods, so we can now safely remove these methods. BUG=159203 Review URL: https://chromiumcodereview.appspot.com/12666008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189574 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync')
-rw-r--r--sync/android/java/src/org/chromium/sync/notifier/SyncStatusHelper.java109
1 files changed, 2 insertions, 107 deletions
diff --git a/sync/android/java/src/org/chromium/sync/notifier/SyncStatusHelper.java b/sync/android/java/src/org/chromium/sync/notifier/SyncStatusHelper.java
index cbc4fd4..0761b80 100644
--- a/sync/android/java/src/org/chromium/sync/notifier/SyncStatusHelper.java
+++ b/sync/android/java/src/org/chromium/sync/notifier/SyncStatusHelper.java
@@ -11,13 +11,10 @@ import android.content.Context;
import android.content.SyncStatusObserver;
import android.os.StrictMode;
-import org.chromium.sync.signin.AccountManagerHelper;
-import org.chromium.sync.signin.ChromeSigninController;
-
import com.google.common.annotations.VisibleForTesting;
-import java.util.HashMap;
-import java.util.Map;
+import org.chromium.sync.signin.AccountManagerHelper;
+import org.chromium.sync.signin.ChromeSigninController;
/**
* A helper class to handle the current status of sync for Chrome in Android-land.
@@ -27,27 +24,9 @@ import java.util.Map;
* To retrieve an instance of this class, call SyncStatusHelper.get(someContext).
*/
public class SyncStatusHelper {
- /**
- * Deprecated. Use {@link ChromeSigninController.Listener}.
- */
- @Deprecated
- public interface Listener {
- /**
- * Called when the user signs out of Chrome.
- */
- void onClearSignedInUser();
- }
-
// TODO(dsmyers): remove the downstream version of this constant.
public static final String AUTH_TOKEN_TYPE_SYNC = "chromiumsync";
- /**
- * Deprecated. Use {@link ChromeSigninController#SIGNED_IN_ACCOUNT_KEY}.
- */
- @Deprecated
- @VisibleForTesting
- public static final String SIGNED_IN_ACCOUNT_KEY = ChromeSigninController.SIGNED_IN_ACCOUNT_KEY;
-
public static final String TAG = SyncStatusHelper.class.getSimpleName();
private static final Object LOCK = new Object();
@@ -58,9 +37,6 @@ public class SyncStatusHelper {
private final SyncContentResolverDelegate mSyncContentResolverWrapper;
- private final Map<Listener, SigninDelegateListenerDelegate> mListenerMap =
- new HashMap<Listener, SigninDelegateListenerDelegate>();
-
/**
* @param context the context
* @param syncContentResolverWrapper an implementation of SyncContentResolverWrapper
@@ -219,46 +195,6 @@ public class SyncStatusHelper {
}
/**
- * Deprecated. Use: {@link ChromeSigninController#getSignedInUser()}.
- */
- @Deprecated
- public Account getSignedInUser() {
- return ChromeSigninController.get(mApplicationContext).getSignedInUser();
- }
-
- /**
- * Deprecated. Use: {@link ChromeSigninController#isSignedIn()}.
- */
- @Deprecated
- public boolean isSignedIn() {
- return ChromeSigninController.get(mApplicationContext).isSignedIn();
- }
-
- /**
- * Deprecated. Use: {@link ChromeSigninController#setSignedInAccountName(String)}.
- */
- @Deprecated
- public void setSignedInAccountName(String accountName) {
- ChromeSigninController.get(mApplicationContext).setSignedInAccountName(accountName);
- }
-
- /**
- * Deprecated. Use: {@link ChromeSigninController#clearSignedInUser()}.
- */
- @Deprecated
- public void clearSignedInUser() {
- ChromeSigninController.get(mApplicationContext).clearSignedInUser();
- }
-
- /**
- * Deprecated. Use: {@link ChromeSigninController#getSignedInAccountName()}.
- */
- @Deprecated
- public String getSignedInAccountName() {
- return ChromeSigninController.get(mApplicationContext).getSignedInAccountName();
- }
-
- /**
* Register with Android Sync Manager. This is what causes the "Chrome" option to appear in
* Settings -> Accounts / Sync .
*
@@ -327,45 +263,4 @@ public class SyncStatusHelper {
StrictMode.setThreadPolicy(newPolicy.build());
return oldPolicy;
}
-
- /**
- * Adds a Listener.
- * Deprecated. Use: {@link ChromeSigninController#addListener(ChromeSigninController.Listener)}.
- *
- * @param listener Listener to add.
- */
- public void addListener(Listener listener) {
- SigninDelegateListenerDelegate signinListener =
- new SigninDelegateListenerDelegate(listener);
- mListenerMap.put(listener, signinListener);
- ChromeSigninController.get(mApplicationContext).addListener(signinListener);
- }
-
- /**
- * Removes a Listener.
- * Deprecated. Use:
- * {@link ChromeSigninController#removeListener(ChromeSigninController.Listener)}.
- *
- * @param listener Listener to remove from the list.
- */
- @Deprecated
- public void removeListener(Listener listener) {
- if (mListenerMap.containsKey(listener)) {
- SigninDelegateListenerDelegate signinListener = mListenerMap.get(listener);
- ChromeSigninController.get(mApplicationContext).removeListener(signinListener);
- }
- }
-
- private static class SigninDelegateListenerDelegate implements ChromeSigninController.Listener {
- private final Listener mListener;
-
- private SigninDelegateListenerDelegate(Listener listener) {
- mListener = listener;
- }
-
- @Override
- public void onClearSignedInUser() {
- mListener.onClearSignedInUser();
- }
- }
}