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

Unified Diff: chrome/browser/resources/settings/passwords_and_forms_page/password_edit_dialog.js

Issue 2617663002: WIP: run clang-format-js on lots of things (Closed)
Patch Set: merge Created 3 years, 11 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/settings/passwords_and_forms_page/password_edit_dialog.js
diff --git a/chrome/browser/resources/settings/passwords_and_forms_page/password_edit_dialog.js b/chrome/browser/resources/settings/passwords_and_forms_page/password_edit_dialog.js
index b2b55bb5d5b3d89e2d12164f3a948984c63fe412..b7e004cbff2eb3b14f05a6723f3d7e2a5fd57d62 100644
--- a/chrome/browser/resources/settings/passwords_and_forms_page/password_edit_dialog.js
+++ b/chrome/browser/resources/settings/passwords_and_forms_page/password_edit_dialog.js
@@ -8,83 +8,85 @@
*/
(function() {
-'use strict';
+ 'use strict';
-Polymer({
- is: 'password-edit-dialog',
+ Polymer({
+ is: 'password-edit-dialog',
- properties: {
- /**
- * The password that is being displayed.
- * @type {!chrome.passwordsPrivate.PasswordUiEntry}
- */
- item: Object,
+ properties: {
+ /**
+ * The password that is being displayed.
+ * @type {!chrome.passwordsPrivate.PasswordUiEntry}
+ */
+ item: Object,
- /** Holds the plaintext password when requested. */
- password: String,
- },
+ /** Holds the plaintext password when requested. */
+ password: String,
+ },
- /** @override */
- attached: function() {
- this.password = '';
- this.$.dialog.showModal();
- },
+ /** @override */
+ attached: function() {
+ this.password = '';
+ this.$.dialog.showModal();
+ },
- /** Closes the dialog. */
- close: function() {
- this.$.dialog.close();
- },
+ /** Closes the dialog. */
+ close: function() {
+ this.$.dialog.close();
+ },
- /**
- * Gets the password input's type. Should be 'text' when password is visible
- * and 'password' when it's not.
- * @param {string} password
- * @private
- */
- getPasswordInputType_: function(password) {
- return password ? 'text' : 'password';
- },
+ /**
+ * Gets the password input's type. Should be 'text' when password is visible
+ * and 'password' when it's not.
+ * @param {string} password
+ * @private
+ */
+ getPasswordInputType_: function(password) {
+ return password ? 'text' : 'password';
+ },
- /**
- * Gets the text of the password. Will use the value of |password| unless it
- * cannot be shown, in which case it will be spaces.
- * @param {!chrome.passwordsPrivate.PasswordUiEntry} item
- * @param {string} password
- * @private
- */
- getPassword_: function(item, password) {
- if (password)
- return password;
- return item ? ' '.repeat(item.numCharactersInPassword) : '';
- },
+ /**
+ * Gets the text of the password. Will use the value of |password| unless it
+ * cannot be shown, in which case it will be spaces.
+ * @param {!chrome.passwordsPrivate.PasswordUiEntry} item
+ * @param {string} password
+ * @private
+ */
+ getPassword_: function(item, password) {
+ if (password)
+ return password;
+ return item ? ' '.repeat(item.numCharactersInPassword) : '';
+ },
- /**
- * Handler for tapping the show/hide button. Will fire an event to request the
- * password for this login pair.
- * @private
- */
- onShowPasswordButtonTap_: function() {
- if (this.password)
- this.password = '';
- else
- this.fire('show-password', this.item.loginPair); // Request the password.
- },
+ /**
+ * Handler for tapping the show/hide button. Will fire an event to request
+ * the
+ * password for this login pair.
+ * @private
+ */
+ onShowPasswordButtonTap_: function() {
+ if (this.password)
+ this.password = '';
+ else
+ this.fire(
+ 'show-password', this.item.loginPair); // Request the password.
+ },
- /**
- * Handler for tapping the 'cancel' button. Should just dismiss the dialog.
- * @private
- */
- onCancelButtonTap_: function() {
- this.close();
- },
+ /**
+ * Handler for tapping the 'cancel' button. Should just dismiss the dialog.
+ * @private
+ */
+ onCancelButtonTap_: function() {
+ this.close();
+ },
- /**
- * Handler for tapping the save button.
- * @private
- */
- onSaveButtonTap_: function() {
- // TODO(hcarmona): what to save?
- this.close();
- },
-});
+ /**
+ * Handler for tapping the save button.
+ * @private
+ */
+ onSaveButtonTap_: function() {
+ // TODO(hcarmona): what to save?
+ this.close();
+ },
+ });
})();

Powered by Google App Engine
This is Rietveld 408576698