diff options
author | rouslan <rouslan@chromium.org> | 2015-09-21 10:03:23 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-09-21 17:04:02 +0000 |
commit | 23b35ce2a622310311225679b3dbf47e08f2b238 (patch) | |
tree | 1f845afbf08ffb9b46e515af917bcfc8a77f3b38 /sync | |
parent | a4f2a4aec6275d1f0d3611db32149a9061722f15 (diff) | |
download | chromium_src-23b35ce2a622310311225679b3dbf47e08f2b238.zip chromium_src-23b35ce2a622310311225679b3dbf47e08f2b238.tar.gz chromium_src-23b35ce2a622310311225679b3dbf47e08f2b238.tar.bz2 |
Clear Wallet data on sign out.
Signing out should clear sync data before stopping sync controllers.
This ensures that Wallet data is cleared. Desktop already does this.
BUG=524158
Review URL: https://codereview.chromium.org/1314673004
Cr-Commit-Position: refs/heads/master@{#349947}
Diffstat (limited to 'sync')
-rw-r--r-- | sync/android/java/src/org/chromium/sync/signin/ChromeSigninController.java | 41 |
1 files changed, 1 insertions, 40 deletions
diff --git a/sync/android/java/src/org/chromium/sync/signin/ChromeSigninController.java b/sync/android/java/src/org/chromium/sync/signin/ChromeSigninController.java index cd86532..b4bff3e 100644 --- a/sync/android/java/src/org/chromium/sync/signin/ChromeSigninController.java +++ b/sync/android/java/src/org/chromium/sync/signin/ChromeSigninController.java @@ -7,9 +7,7 @@ package org.chromium.sync.signin; import android.accounts.Account; import android.content.Context; import android.preference.PreferenceManager; -import android.util.Log; -import org.chromium.base.ObserverList; import org.chromium.base.VisibleForTesting; import org.chromium.sync.AndroidSyncSettings; @@ -18,16 +16,6 @@ import org.chromium.sync.AndroidSyncSettings; */ public class ChromeSigninController { - /** - * Interface for listening to signin events from ChromeSigninController. - */ - public interface Listener { - /** - * Called when the user signs out of Chrome. - */ - void onClearSignedInUser(); - } - public static final String TAG = "ChromeSigninController"; @VisibleForTesting @@ -39,8 +27,6 @@ public class ChromeSigninController { private final Context mApplicationContext; - private final ObserverList<Listener> mListeners = new ObserverList<Listener>(); - private ChromeSigninController(Context context) { mApplicationContext = context.getApplicationContext(); AndroidSyncSettings.updateAccount(context, getSignedInUser()); @@ -81,33 +67,8 @@ public class ChromeSigninController { AndroidSyncSettings.updateAccount(mApplicationContext, getSignedInUser()); } - public void clearSignedInUser() { - Log.d(TAG, "Clearing user signed in to Chrome"); - setSignedInAccountName(null); - - for (Listener listener : mListeners) { - listener.onClearSignedInUser(); - } - } - public String getSignedInAccountName() { return PreferenceManager.getDefaultSharedPreferences(mApplicationContext) .getString(SIGNED_IN_ACCOUNT_KEY, null); } - - /** - * Adds a Listener. - * @param listener Listener to add. - */ - public void addListener(Listener listener) { - mListeners.addObserver(listener); - } - - /** - * Removes a Listener. - * @param listener Listener to remove from the list. - */ - public void removeListener(Listener listener) { - mListeners.removeObserver(listener); - } -}
\ No newline at end of file +} |