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

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

Issue 577843003: Revert of Add public API generation with cr.makePublic() and handle it in compiler pass (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@H_options_errors_3
Patch Set: 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 4c414856d7f39599203ee9c072095a806e01d9ac..dcdcc1a273c0210913a60be866fe2adc32caec31 100644
--- a/chrome/browser/resources/options/manage_profile_overlay.js
+++ b/chrome/browser/resources/options/manage_profile_overlay.js
@@ -356,7 +356,7 @@
* @param {boolean} nameIsUnique
*/
getImportHandler_: function(supervisedUser, nameIsUnique) {
- return function() {
+ return (function() {
if (supervisedUser.needAvatar || !nameIsUnique) {
PageManager.showPageByName('supervisedUserImport');
} else {
@@ -366,7 +366,7 @@
[supervisedUser.name, supervisedUser.iconURL, false, true,
supervisedUser.id]);
}
- }.bind(this);
+ }).bind(this);
},
/**
@@ -597,7 +597,7 @@
};
// Forward public APIs to private implementations.
- cr.makePublic(ManageProfileOverlay, [
+ [
'receiveDefaultProfileIconsAndNames',
'receiveNewProfileDefaults',
'receiveExistingProfileNames',
@@ -608,7 +608,12 @@
'showDeleteDialog',
'showDisconnectManagedProfileDialog',
'showCreateDialog',
- ]);
+ ].forEach(function(name) {
+ ManageProfileOverlay[name] = function() {
+ var instance = ManageProfileOverlay.getInstance();
+ return instance[name + '_'].apply(instance, arguments);
+ };
+ });
function CreateProfileOverlay() {
Page.call(this, 'createProfile',
@@ -848,7 +853,7 @@
};
// Forward public APIs to private implementations.
- cr.makePublic(CreateProfileOverlay, [
+ [
'cancelCreateProfile',
'onError',
'onSuccess',
@@ -856,7 +861,12 @@
'updateCreateInProgress',
'updateSignedInStatus',
'updateSupervisedUsersAllowed',
- ]);
+ ].forEach(function(name) {
+ CreateProfileOverlay[name] = function() {
+ var instance = CreateProfileOverlay.getInstance();
+ return instance[name + '_'].apply(instance, arguments);
+ };
+ });
// Export
return {
« no previous file with comments | « chrome/browser/resources/options/chromeos/keyboard_overlay.js ('k') | chrome/browser/resources/options/password_manager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698