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

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

Issue 2939273002: DO NOT SUBMIT: what chrome/browser/resources/ could eventually look like with clang-format (Closed)
Patch Set: Created 3 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
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 7e3371df91718cb899f0a9db3b35eacfaa0aed54..5d34421b90939d711811ac9ad92762998f81fab1 100644
--- a/chrome/browser/resources/options/manage_profile_overlay.js
+++ b/chrome/browser/resources/options/manage_profile_overlay.js
@@ -14,9 +14,9 @@ cr.define('options', function() {
* @extends {cr.ui.pageManager.Page}
*/
function ManageProfileOverlay() {
- Page.call(this, 'manageProfile',
- loadTimeData.getString('manageProfileTabTitle'),
- 'manage-profile-overlay');
+ Page.call(
+ this, 'manageProfile', loadTimeData.getString('manageProfileTabTitle'),
+ 'manage-profile-overlay');
}
cr.addSingletonGetter(ManageProfileOverlay);
@@ -49,10 +49,10 @@ cr.define('options', function() {
var self = this;
options.ProfilesIconGrid.decorate($('manage-profile-icon-grid'));
options.ProfilesIconGrid.decorate($('create-profile-icon-grid'));
- self.registerCommonEventHandlers_('create',
- self.submitCreateProfile_.bind(self));
- self.registerCommonEventHandlers_('manage',
- self.submitManageChanges_.bind(self));
+ self.registerCommonEventHandlers_(
+ 'create', self.submitCreateProfile_.bind(self));
+ self.registerCommonEventHandlers_(
+ 'manage', self.submitManageChanges_.bind(self));
// Override the create-profile-ok and create-* keydown handlers, to avoid
// closing the overlay until we finish creating the profile.
@@ -66,9 +66,9 @@ cr.define('options', function() {
$('manage-profile-cancel').onclick =
$('disconnect-managed-profile-cancel').onclick =
- $('delete-profile-cancel').onclick = function(event) {
- PageManager.closeOverlay();
- };
+ $('delete-profile-cancel').onclick = function(event) {
+ PageManager.closeOverlay();
+ };
$('delete-profile-ok').onclick = function(event) {
PageManager.closeOverlay();
chrome.send('deleteProfile', [self.profileInfo_.filePath]);
@@ -83,8 +83,8 @@ cr.define('options', function() {
$('disconnect-managed-profile-ok').onclick = function(event) {
PageManager.closeOverlay();
- chrome.send('deleteProfile',
- [BrowserOptions.getCurrentProfile().filePath]);
+ chrome.send(
+ 'deleteProfile', [BrowserOptions.getCurrentProfile().filePath]);
};
$('create-profile-supervised-signed-in-learn-more-link').onclick =
@@ -93,13 +93,12 @@ cr.define('options', function() {
return false;
};
- $('create-profile-supervised-sign-in-link').onclick =
- function(event) {
+ $('create-profile-supervised-sign-in-link').onclick = function(event) {
SyncSetupOverlay.startSignIn(true /* creatingSupervisedUser */);
};
- $('create-profile-supervised-sign-in-again-link').onclick =
- function(event) {
+ $('create-profile-supervised-sign-in-again-link').onclick = function(
+ event) {
SyncSetupOverlay.showSetupUI();
};
@@ -353,9 +352,10 @@ cr.define('options', function() {
} else {
this.hideErrorBubble_('create');
CreateProfileOverlay.updateCreateInProgress(true);
- chrome.send('createProfile',
- [supervisedUser.name, supervisedUser.iconURL, false, true,
- supervisedUser.id]);
+ chrome.send('createProfile', [
+ supervisedUser.name, supervisedUser.iconURL, false, true,
+ supervisedUser.id
+ ]);
}
}.bind(this);
},
@@ -399,8 +399,8 @@ cr.define('options', function() {
for (j = i + 1; j < supervisedUsers.length; ++j) {
if (supervisedUsers[j].name == newName) {
nameIsUnique = false;
- allOnCurrentDevice = allOnCurrentDevice &&
- supervisedUsers[j].onCurrentDevice;
+ allOnCurrentDevice =
+ allOnCurrentDevice && supervisedUsers[j].onCurrentDevice;
}
}
@@ -455,8 +455,8 @@ cr.define('options', function() {
var name = $('manage-profile-name').value;
var iconURL = $('manage-profile-icon-grid').selectedItem;
- chrome.send('setProfileIconAndName',
- [this.profileInfo_.filePath, iconURL, name]);
+ chrome.send(
+ 'setProfileIconAndName', [this.profileInfo_.filePath, iconURL, name]);
if (name != this.profileInfo_.name)
options.SupervisedUserListData.resetPromise();
},
@@ -495,9 +495,9 @@ cr.define('options', function() {
var existingSupervisedUserId = '';
// 'createProfile' is handled by the CreateProfileHandler.
- chrome.send('createProfile',
- [name, iconUrl, createShortcut,
- isSupervised, existingSupervisedUserId]);
+ chrome.send('createProfile', [
+ name, iconUrl, createShortcut, isSupervised, existingSupervisedUserId
+ ]);
},
/**
@@ -520,8 +520,9 @@ cr.define('options', function() {
}
}
if (this.profileInfo_ && this.profileInfo_.filePath) {
- chrome.send('profileIconSelectionChanged',
- [this.profileInfo_.filePath, iconURL]);
+ chrome.send(
+ 'profileIconSelectionChanged',
+ [this.profileInfo_.filePath, iconURL]);
}
},
@@ -568,9 +569,8 @@ cr.define('options', function() {
$('manage-profile-overlay-disconnect-managed').hidden = true;
$('delete-profile-icon').style.content =
cr.icon.getImage(profileInfo.iconURL);
- $('delete-profile-text').textContent =
- loadTimeData.getStringF('deleteProfileMessage',
- elide(profileInfo.name, /* maxLength */ 50));
+ $('delete-profile-text').textContent = loadTimeData.getStringF(
+ 'deleteProfileMessage', elide(profileInfo.name, /* maxLength */ 50));
$('delete-supervised-profile-addendum').hidden =
!profileInfo.isSupervised || profileInfo.isChild;
@@ -626,9 +626,9 @@ cr.define('options', function() {
* @extends {options.ManageProfileOverlay}
*/
function DisconnectAccountOverlay() {
- Page.call(this, 'signOut',
- loadTimeData.getString('disconnectAccountTabTitle'),
- 'manage-profile-overlay');
+ Page.call(
+ this, 'signOut', loadTimeData.getString('disconnectAccountTabTitle'),
+ 'manage-profile-overlay');
}
cr.addSingletonGetter(DisconnectAccountOverlay);
@@ -653,9 +653,9 @@ cr.define('options', function() {
* @extends {options.ManageProfileOverlay}
*/
function CreateProfileOverlay() {
- Page.call(this, 'createProfile',
- loadTimeData.getString('createProfileTabTitle'),
- 'manage-profile-overlay');
+ Page.call(
+ this, 'createProfile', loadTimeData.getString('createProfileTabTitle'),
+ 'manage-profile-overlay');
}
cr.addSingletonGetter(CreateProfileOverlay);
@@ -686,7 +686,7 @@ cr.define('options', function() {
$('manage-profile-overlay-delete').hidden = true;
$('manage-profile-overlay-disconnect-managed').hidden = true;
$('create-profile-instructions').textContent =
- loadTimeData.getStringF('createProfileInstructions');
+ loadTimeData.getStringF('createProfileInstructions');
this.hideErrorBubble_();
this.updateCreateInProgress_(false);
@@ -718,9 +718,8 @@ cr.define('options', function() {
/** @override */
showErrorBubble_: function(errorHtml) {
- ManageProfileOverlay.getInstance().showErrorBubble_(errorHtml,
- 'create',
- false);
+ ManageProfileOverlay.getInstance().showErrorBubble_(
+ errorHtml, 'create', false);
},
/** @override */
@@ -875,11 +874,11 @@ cr.define('options', function() {
$('create-profile-supervised-sign-in-link').enabled = allowed;
if (!allowed) {
- $('create-profile-supervised-indicator').setAttribute('controlled-by',
- 'policy');
+ $('create-profile-supervised-indicator')
+ .setAttribute('controlled-by', 'policy');
} else {
- $('create-profile-supervised-indicator').removeAttribute(
- 'controlled-by');
+ $('create-profile-supervised-indicator')
+ .removeAttribute('controlled-by');
}
},
@@ -891,9 +890,8 @@ cr.define('options', function() {
* @private
*/
updateCreateSupervisedUserCheckbox_: function() {
- $('create-profile-supervised').disabled =
- !this.supervisedUsersAllowed_ || this.createInProgress_ ||
- this.signedInEmail_ == '' || this.hasError_;
+ $('create-profile-supervised').disabled = !this.supervisedUsersAllowed_ ||
+ this.createInProgress_ || this.signedInEmail_ == '' || this.hasError_;
},
};

Powered by Google App Engine
This is Rietveld 408576698