Index: chrome/android/java/src/org/chromium/chrome/browser/signin/SigninManager.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninManager.java b/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninManager.java |
index 7ad5aaac3d80df0dd3fe29159f95a84b050ee133..26b78d97e0cda606ccd6f5b686ae161facfdf7a1 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninManager.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninManager.java |
@@ -22,8 +22,9 @@ import org.chromium.base.metrics.RecordUserAction; |
import org.chromium.chrome.browser.externalauth.ExternalAuthUtils; |
import org.chromium.chrome.browser.externalauth.UserRecoverableErrorHandler; |
import org.chromium.chrome.browser.sync.SyncUserDataWiper; |
-import org.chromium.components.sync.signin.AccountManagerHelper; |
-import org.chromium.components.sync.signin.ChromeSigninController; |
+import org.chromium.components.signin.AccountManagerHelper; |
+import org.chromium.components.signin.ChromeSigninController; |
+import org.chromium.components.sync.AndroidSyncSettings; |
import javax.annotation.Nullable; |
@@ -434,6 +435,7 @@ public class SigninManager implements AccountTrackerService.OnSystemAccountsSeed |
// Cache the signed-in account name. This must be done after the native call, otherwise |
// sync tries to start without being signed in natively and crashes. |
ChromeSigninController.get(mContext).setSignedInAccountName(mSignInState.account.name); |
+ AndroidSyncSettings.updateAccount(mContext, mSignInState.account); |
if (mSignInState.callback != null) { |
mSignInState.callback.onSignInComplete(); |
@@ -513,6 +515,7 @@ public class SigninManager implements AccountTrackerService.OnSystemAccountsSeed |
// http://crbug.com/589028 |
nativeSignOut(mNativeSigninManagerAndroid); |
ChromeSigninController.get(mContext).setSignedInAccountName(null); |
+ AndroidSyncSettings.updateAccount(mContext, null); |
if (wipeData) { |
wipeProfileData(wipeDataHooks); |