Commit 14a08d58 authored by Alice Wang's avatar Alice Wang Committed by Commit Bot

[Android][Signin] Change IdentityManager.Observer methods to default

This CL changes the onPrimaryAccountSet() and onPrimaryAccountCleared()
methods to default in IdentityManager.Observer to avoid redundant
empty implementation.

Bug: 1132873
Change-Id: I573cb7e4e6bb4e4d12217aff1249a9da8f249dd0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2438424Reviewed-by: default avatarBoris Sazonov <bsazonov@chromium.org>
Commit-Queue: Alice Wang <aliceywang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#813302}
parent 43168c1b
...@@ -32,7 +32,6 @@ import org.chromium.components.browser_ui.util.AvatarGenerator; ...@@ -32,7 +32,6 @@ import org.chromium.components.browser_ui.util.AvatarGenerator;
import org.chromium.components.signin.AccountManagerFacadeProvider; import org.chromium.components.signin.AccountManagerFacadeProvider;
import org.chromium.components.signin.ProfileDataSource; import org.chromium.components.signin.ProfileDataSource;
import org.chromium.components.signin.base.AccountInfo; import org.chromium.components.signin.base.AccountInfo;
import org.chromium.components.signin.base.CoreAccountInfo;
import org.chromium.components.signin.identitymanager.IdentityManager; import org.chromium.components.signin.identitymanager.IdentityManager;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -280,18 +279,6 @@ public class ProfileDataCache implements ProfileDownloader.Observer, ProfileData ...@@ -280,18 +279,6 @@ public class ProfileDataCache implements ProfileDownloader.Observer, ProfileData
} }
} }
/**
* Implements {@link IdentityManager.Observer}.
*/
@Override
public void onPrimaryAccountSet(CoreAccountInfo account) {}
/**
* Implements {@link IdentityManager.Observer}.
*/
@Override
public void onPrimaryAccountCleared(CoreAccountInfo account) {}
/** /**
* Returns a profile data cache object without a badge.The badge is put with respect to * Returns a profile data cache object without a badge.The badge is put with respect to
* R.dimen.user_picture_size. So this method only works with the user avatar of this size. * R.dimen.user_picture_size. So this method only works with the user avatar of this size.
......
...@@ -32,14 +32,14 @@ public class IdentityManager { ...@@ -32,14 +32,14 @@ public class IdentityManager {
* Called when an account becomes the user's primary account. * Called when an account becomes the user's primary account.
* This method is not called during a reauth. * This method is not called during a reauth.
*/ */
void onPrimaryAccountSet(CoreAccountInfo account); default void onPrimaryAccountSet(CoreAccountInfo account) {}
/** /**
* Called when the user moves from having a primary account to no longer having a primary * Called when the user moves from having a primary account to no longer having a primary
* account (note that the user may still have an *unconsented* primary account after this * account (note that the user may still have an *unconsented* primary account after this
* event). * event).
*/ */
void onPrimaryAccountCleared(CoreAccountInfo account); default void onPrimaryAccountCleared(CoreAccountInfo account) {}
/** /**
* Called when the Gaia cookie has been deleted explicitly by a user action, e.g. from * Called when the Gaia cookie has been deleted explicitly by a user action, e.g. from
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment