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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/signin/SigninManager.java

Issue 1698043006: Created the dialog offering the user to merge their account data or keep it (Closed) Base URL: maybelle.lon.corp.google.com:/usr/local/google/code/clankium/src@sync_settings
Patch Set: Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
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 5d2bcd99193dba66e781bf2cc24ab0c85430129a..2a3a18a3f6f83ec2892e900cf5e6a9e8444520d9 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
@@ -23,7 +23,6 @@ import org.chromium.base.metrics.RecordHistogram;
import org.chromium.base.metrics.RecordUserAction;
import org.chromium.chrome.browser.externalauth.ExternalAuthUtils;
import org.chromium.chrome.browser.externalauth.UserRecoverableErrorHandler;
-import org.chromium.signin.InvestigatedScenario;
import org.chromium.sync.signin.AccountManagerHelper;
import org.chromium.sync.signin.ChromeSigninController;
@@ -292,7 +291,7 @@ public class SigninManager implements AccountTrackerService.OnSystemAccountsSeed
public void onSystemAccountsSeedingComplete() {
if (mSignInState != null && mSignInState.blockedOnAccountSeeding) {
mSignInState.blockedOnAccountSeeding = false;
- progressSignInFlowInvestigateScenario();
+ progressSignInFlowCheckPolicy();
}
}
@@ -366,7 +365,7 @@ public class SigninManager implements AccountTrackerService.OnSystemAccountsSeed
private void progressSignInFlowSeedSystemAccounts() {
if (AccountTrackerService.get(mContext).checkAndSeedSystemAccounts()) {
- progressSignInFlowInvestigateScenario();
+ progressSignInFlowCheckPolicy();
} else if (AccountIdProvider.getInstance().canBeUsed(mContext)) {
mSignInState.blockedOnAccountSeeding = true;
} else {
@@ -381,11 +380,11 @@ public class SigninManager implements AccountTrackerService.OnSystemAccountsSeed
}
/**
- * If sign-in is interactive and the user is changing accounts, display a confirmation dialog.
+ * Continues the signin flow by checking if there is a policy that the account is subject to.
*/
- private void progressSignInFlowInvestigateScenario() {
- if (!mSignInState.isInteractive()) {
- progressSignInFlowCheckPolicy();
+ private void progressSignInFlowCheckPolicy() {
+ if (mSignInState == null) {
+ Log.w(TAG, "Ignoring sign in progress request as no pending sign in.");
return;
}
@@ -394,41 +393,6 @@ public class SigninManager implements AccountTrackerService.OnSystemAccountsSeed
return;
}
- // TODO(skym): Warn for high risk upgrade scenario, crbug.com/572754.
- if (SigninInvestigator.investigate(mSignInState.account.name)
skym 2016/02/26 20:22:57 I'm concerned that by changing the ordering of the
PEConn 2016/03/03 18:23:25 Can you expand on this? I can see that the signin
skym 2016/03/03 18:54:51 Sorry for not being very clear. The problem isn't
- == InvestigatedScenario.DIFFERENT_ACCOUNT) {
- mSignInState.displayedDialog =
- ConfirmAccountChangeFragment.newInstance(mSignInState.account.name);
- mSignInState.displayedDialog.show(
- mSignInState.activity.getFragmentManager(), CONFIRM_ACCOUNT_CHANGED_DIALOG_TAG);
- } else {
- // Do not display dialog, just sign-in.
- progressSignInFlowCheckPolicy();
- }
- }
-
- /**
- * Called from ConfirmAccountChangeFragment if the new account name was confirmed.
- */
- void progressInteractiveSignInFlowAccountConfirmed() {
- if (mSignInState == null || mSignInState.displayedDialog == null) {
- // Stop if sign-in was cancelled or this is a duplicate click event.
- return;
- }
- mSignInState.displayedDialog = null;
-
- progressSignInFlowCheckPolicy();
- }
-
- /**
- * Continues the signin flow by checking if there is a policy that the account is subject to.
- */
- private void progressSignInFlowCheckPolicy() {
- if (mSignInState == null) {
- Log.w(TAG, "Ignoring sign in progress request as no pending sign in.");
- return;
- }
-
if (!nativeShouldLoadPolicyForUser(mSignInState.account.name)) {
// Proceed with the sign-in flow without checking for policy if it can be determined
// that this account can't have management enabled based on the username.
@@ -465,6 +429,7 @@ public class SigninManager implements AccountTrackerService.OnSystemAccountsSeed
return;
}
+ // TODO(peconn): Move this and other UI interactions into AccountSigninView.
Log.d(TAG, "Account has policy management");
mSignInState.displayedDialog = ConfirmManagedSigninFragment.newInstance(managementDomain);
mSignInState.displayedDialog.show(

Powered by Google App Engine
This is Rietveld 408576698