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

Unified Diff: chrome/browser/resources/options/manage_profile_overlay.js

Issue 17155020: Fix some timing and display issues with the supervised-user confirmation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Re-uploading because Rietveld. Created 7 years, 6 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/app/generated_resources.grd ('k') | chrome/browser/resources/options/managed_user_create_confirm.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/options/manage_profile_overlay.js
===================================================================
--- chrome/browser/resources/options/manage_profile_overlay.js (revision 207949)
+++ chrome/browser/resources/options/manage_profile_overlay.js (working copy)
@@ -417,6 +417,10 @@
// Inherit from ManageProfileOverlay.
__proto__: ManageProfileOverlay.prototype,
+ // The signed-in email address of the current profile, or empty if they're
+ // not signed in.
+ signedInEmail_: '',
+
/**
* Configures the overlay to the "create user" mode.
* @override
@@ -527,6 +531,7 @@
this.updateCreateInProgress_(false);
OptionsPage.closeOverlay();
if (profileInfo.isManaged) {
+ profileInfo.custodianEmail = this.signedInEmail_;
ManagedUserCreateConfirmOverlay.setProfileInfo(profileInfo);
OptionsPage.navigateToPage('managedUserCreateConfirm');
}
@@ -535,19 +540,23 @@
/**
* Updates the signed-in or not-signed-in UI when in create mode. Called by
* the handler in response to the 'requestSignedInText' message.
- * @param {string} text The text to show for a signed-in user. An empty
- * string indicates that the user is not signed in.
+ * @param {string} email The email address of the currently signed-in user.
+ * An empty string indicates that the user is not signed in.
* @private
*/
- updateSignedInStatus_: function(text) {
- var isSignedIn = text !== '';
+ updateSignedInStatus_: function(email) {
+ this.signedInEmail_ = email;
+ var isSignedIn = email !== '';
$('create-profile-managed-signed-in').hidden = !isSignedIn;
$('create-profile-managed-not-signed-in').hidden = isSignedIn;
$('create-profile-managed').disabled = !isSignedIn;
- if (!isSignedIn)
+ if (isSignedIn) {
+ $('create-profile-managed-signed-in-label').textContent =
+ loadTimeData.getStringF(
+ 'manageProfilesManagedSignedInLabel', email);
+ } else {
$('create-profile-managed').checked = false;
-
- $('create-profile-managed-signed-in-label').textContent = text;
+ }
},
};
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/resources/options/managed_user_create_confirm.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698