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

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

Issue 543493002: Compile chrome://settings, part 2: reduce from 950 to 400 errors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@F_settings
Patch Set: rebase? rebase! Created 6 years, 3 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/browser/resources/options/manage_profile_overlay.js
diff --git a/chrome/browser/resources/options/manage_profile_overlay.js b/chrome/browser/resources/options/manage_profile_overlay.js
index 1eab7e6fc54de81464a91b37edc227f1048dee59..dcdcc1a273c0210913a60be866fe2adc32caec31 100644
--- a/chrome/browser/resources/options/manage_profile_overlay.js
+++ b/chrome/browser/resources/options/manage_profile_overlay.js
@@ -11,7 +11,7 @@ cr.define('options', function() {
* ManageProfileOverlay class
* Encapsulated handling of the 'Manage profile...' overlay page.
* @constructor
- * @class
+ * @extends {cr.ui.pageManager.Page}
*/
function ManageProfileOverlay() {
Page.call(this, 'manageProfile',
@@ -352,6 +352,24 @@ cr.define('options', function() {
},
/**
+ * @param {Object} supervisedUser
+ * @param {boolean} nameIsUnique
+ */
+ getImportHandler_: function(supervisedUser, nameIsUnique) {
+ return (function() {
+ if (supervisedUser.needAvatar || !nameIsUnique) {
+ PageManager.showPageByName('supervisedUserImport');
+ } else {
+ this.hideErrorBubble_('create');
+ CreateProfileOverlay.updateCreateInProgress(true);
+ chrome.send('createProfile',
+ [supervisedUser.name, supervisedUser.iconURL, false, true,
+ supervisedUser.id]);
+ }
+ }).bind(this);
+ },
+
+ /**
* Callback which receives the list of existing supervised users. Checks if
* the currently entered name is the name of an already existing supervised
* user. If yes, the user is prompted to import the existing supervised
@@ -386,22 +404,8 @@ cr.define('options', function() {
break;
}
}
- var self = this;
- function getImportHandler(supervisedUser, nameIsUnique) {
- return function() {
- if (supervisedUser.needAvatar || !nameIsUnique) {
- PageManager.showPageByName('supervisedUserImport');
- } else {
- self.hideErrorBubble_('create');
- CreateProfileOverlay.updateCreateInProgress(true);
- chrome.send('createProfile',
- [supervisedUser.name, supervisedUser.iconURL, false, true,
- supervisedUser.id]);
- }
- }
- };
$('supervised-user-import-existing').onclick =
- getImportHandler(supervisedUsers[i], nameIsUnique);
+ this.getImportHandler_(supervisedUsers[i], nameIsUnique);
$('create-profile-ok').disabled = true;
return;
}
« no previous file with comments | « chrome/browser/resources/options/language_options.js ('k') | chrome/browser/resources/options/options_page.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698