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

Unified Diff: chrome/browser/resources/md_user_manager/create_profile.js

Issue 1993503004: MD User Manager: Clear existing error messages before browser calls (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 4 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/md_user_manager/create_profile.js
diff --git a/chrome/browser/resources/md_user_manager/create_profile.js b/chrome/browser/resources/md_user_manager/create_profile.js
index 8f5a151ac19788caea00da8ec331dea897d069f4..4295fc2eb1473caa58ee3e57733445ab63128e67 100644
--- a/chrome/browser/resources/md_user_manager/create_profile.js
+++ b/chrome/browser/resources/md_user_manager/create_profile.js
@@ -219,6 +219,7 @@ Polymer({
this.handleMessage_(this.i18n('custodianAccountNotSelectedError'));
} else {
var signedInUser = this.signedInUser_(this.signedInUserIndex_);
+ this.clearMessage_();
this.createInProgress_ = true;
this.browserProxy_.getExistingSupervisedUsers(signedInUser.profilePath)
.then(this.showImportSupervisedUserPopup_.bind(this),
@@ -240,6 +241,7 @@ Polymer({
this.handleMessage_(this.i18n('custodianAccountNotSelectedError'));
} else {
var signedInUser = this.signedInUser_(this.signedInUserIndex_);
+ this.clearMessage_();
this.createInProgress_ = true;
this.browserProxy_.getExistingSupervisedUsers(signedInUser.profilePath)
.then(this.createProfileIfValidSupervisedUser_.bind(this),
@@ -326,6 +328,7 @@ Polymer({
custodianProfilePath =
this.signedInUser_(this.signedInUserIndex_).profilePath;
}
+ this.clearMessage_();
this.createInProgress_ = true;
this.browserProxy_.createProfile(
this.profileName_, this.profileIconUrl_, this.isSupervised_, '',
@@ -342,6 +345,7 @@ Polymer({
onImportUserPopupImport_: function(event) {
var supervisedUser = event.detail.supervisedUser;
var signedInUser = event.detail.signedInUser;
+ this.clearMessage_();
this.createInProgress_ = true;
this.browserProxy_.createProfile(
supervisedUser.name, supervisedUser.iconURL, true, supervisedUser.id,
@@ -396,6 +400,14 @@ Polymer({
},
/**
+ * Clears the warning/error message.
+ * @private
+ */
+ clearMessage_: function() {
+ this.message_ = '';
+ },
+
+ /**
* Handles profile create/import warning/error message pushed by the browser.
* @param {*} message An HTML warning/error message.
* @private
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698