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

Unified Diff: chrome/browser/resources/chromeos/login/screen_locally_managed_user_creation.js

Issue 13553002: Managed user creation flow: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nits Created 7 years, 9 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
« no previous file with comments | « chrome/browser/resources/chromeos/login/screen_error_message.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/login/screen_locally_managed_user_creation.js
diff --git a/chrome/browser/resources/chromeos/login/screen_locally_managed_user_creation.js b/chrome/browser/resources/chromeos/login/screen_locally_managed_user_creation.js
index 38a9ce2520b2ca0b00b0f99013fb22d6960139eb..092e8caca77de295d387d4b9d8ec61ceeaca537e 100644
--- a/chrome/browser/resources/chromeos/login/screen_locally_managed_user_creation.js
+++ b/chrome/browser/resources/chromeos/login/screen_locally_managed_user_creation.js
@@ -211,6 +211,8 @@ cr.define('login', function() {
lastIncorrectUserName_: null,
managerList_: null,
+ currentPage_: null,
+
/** @override */
decorate: function() {
this.managerList_ = new ManagerPodList();
@@ -322,7 +324,7 @@ cr.define('login', function() {
e.stopPropagation();
});
cancelButton.addEventListener('click', function(e) {
- creationFlowScreen.abortFlow_();
+ creationFlowScreen.cancel();
e.stopPropagation();
});
@@ -524,6 +526,7 @@ cr.define('login', function() {
var screen = $('managed-user-creation-flow-' + screenName);
screen.hidden = (screenName != visiblePage);
}
+ this.currentPage_ = visiblePage;
},
/**
@@ -560,10 +563,6 @@ cr.define('login', function() {
chrome.send('retryLocalManagedUserCreation');
},
- abortFlow_: function() {
- chrome.send('abortLocalManagedUserCreation');
- },
-
/**
* Updates state of login header so that necessary buttons are displayed.
**/
@@ -620,6 +619,24 @@ cr.define('login', function() {
if (userList.length > 0)
this.managerList_.selectPod(this.managerList_.pods[0]);
},
+
+ /**
+ * Cancels user creation and drops to user screen (either sign).
+ */
+ cancel: function() {
+ var notSignedInScreens = ['initial'];
+ if (notSignedInScreens.indexOf(this.currentPage_) >= 0) {
+ // Make sure no manager password is kept:
+ this.managerList_.clearPods();
+
+ $('pod-row').loadLastWallpaper();
+
+ Oobe.showScreen({id: SCREEN_ACCOUNT_PICKER});
+ Oobe.resetSigninUI(true);
+ return;
+ }
+ chrome.send('abortLocalManagedUserCreation');
+ },
};
LocallyManagedUserCreationScreen.showProgressScreen = function() {
@@ -691,4 +708,3 @@ cr.define('login', function() {
LocallyManagedUserCreationScreen: LocallyManagedUserCreationScreen
};
});
-
« no previous file with comments | « chrome/browser/resources/chromeos/login/screen_error_message.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698