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

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

Issue 553573003: Compile chrome://settings, part 3: 167 proper errors left (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@G_options_errors_1
Patch Set: 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/autofill_options_list.js
diff --git a/chrome/browser/resources/options/autofill_options_list.js b/chrome/browser/resources/options/autofill_options_list.js
index aa3198dde05e076c6ae43459c73b7bd84d2bff83..565a62e6d353c7733f663f2c32fdc5792ab4b3e8 100644
--- a/chrome/browser/resources/options/autofill_options_list.js
+++ b/chrome/browser/resources/options/autofill_options_list.js
@@ -12,7 +12,8 @@ cr.define('options.autofillOptions', function() {
* @return {!HTMLButtonElement}
*/
function AutofillEditProfileButton(guid, edit) {
- var editButtonEl = document.createElement('button');
+ var editButtonEl = /** @type {HTMLButtonElement} */(
+ document.createElement('button'));
editButtonEl.className = 'list-inline-button custom-appearance';
editButtonEl.textContent =
loadTimeData.getString('autofillEditProfileButton');
@@ -112,7 +113,8 @@ cr.define('options.autofillOptions', function() {
/**
* Creates a new value list item.
- * @param {AutofillValuesList} list The parent list of this item.
+ * @param {options.autofillOptions.AutofillValuesList} list The parent list of
+ * this item.
* @param {string} entry A string value.
* @constructor
* @extends {options.InlineEditableItem}
@@ -138,7 +140,7 @@ cr.define('options.autofillOptions', function() {
this.isPlaceholder = !this.value;
// The stored value.
- var cell = this.createEditableTextCell(this.value);
+ var cell = this.createEditableTextCell(String(this.value));
this.contentElement.appendChild(cell);
this.input = cell.querySelector('input');
@@ -151,7 +153,7 @@ cr.define('options.autofillOptions', function() {
},
/**
- * @return {string} This item's value.
+ * @return {Array} This item's value.
* @protected
*/
value_: function() {
@@ -159,7 +161,7 @@ cr.define('options.autofillOptions', function() {
},
/**
- * @param {Object} value The value to test.
+ * @param {*} value The value to test.
* @return {boolean} True if the given value is non-empty.
* @protected
*/
@@ -226,7 +228,7 @@ cr.define('options.autofillOptions', function() {
* list of this item.
* @param {Array.<string>} entry An array of [first, middle, last] names.
* @constructor
- * @extends {options.ValuesListItem}
+ * @extends {options.autofillOptions.ValuesListItem}
*/
function NameListItem(list, entry) {
var el = cr.doc.createElement('div');
@@ -338,7 +340,7 @@ cr.define('options.autofillOptions', function() {
/**
* Create a new address list.
* @constructor
- * @extends {options.AutofillProfileList}
+ * @extends {options.autofillOptions.AutofillProfileList}
*/
var AutofillAddressList = cr.ui.define('list');
@@ -354,7 +356,10 @@ cr.define('options.autofillOptions', function() {
AutofillOptions.loadAddressEditor(this.dataModel.item(index)[0]);
},
- /** @override */
+ /**
+ * @override
+ * @param {Array} entry
+ */
createItem: function(entry) {
return new AddressListItem(entry);
},
@@ -384,7 +389,10 @@ cr.define('options.autofillOptions', function() {
AutofillOptions.loadCreditCardEditor(this.dataModel.item(index)[0]);
},
- /** @override */
+ /**
+ * @override
+ * @param {Array} entry
+ */
createItem: function(entry) {
return new CreditCardListItem(entry);
},
@@ -405,7 +413,10 @@ cr.define('options.autofillOptions', function() {
AutofillValuesList.prototype = {
__proto__: InlineEditableItemList.prototype,
- /** @override */
+ /**
+ * @override
+ * @param {string} entry
+ */
createItem: function(entry) {
return new ValuesListItem(this, entry);
},
@@ -463,14 +474,17 @@ cr.define('options.autofillOptions', function() {
/**
* Create a new value list for phone number validation.
* @constructor
- * @extends {options.AutofillValuesList}
+ * @extends {options.autofillOptions.AutofillValuesList}
*/
var AutofillNameValuesList = cr.ui.define('list');
AutofillNameValuesList.prototype = {
__proto__: AutofillValuesList.prototype,
- /** @override */
+ /**
+ * @override
+ * @param {Array.<string>} entry
+ */
createItem: function(entry) {
return new NameListItem(this, entry);
},
@@ -479,7 +493,7 @@ cr.define('options.autofillOptions', function() {
/**
* Create a new value list for phone number validation.
* @constructor
- * @extends {options.AutofillValuesList}
+ * @extends {options.autofillOptions.AutofillValuesList}
*/
var AutofillPhoneValuesList = cr.ui.define('list');
@@ -542,6 +556,7 @@ cr.define('options.autofillOptions', function() {
};
return {
+ AutofillProfileList: AutofillProfileList,
AddressListItem: AddressListItem,
CreditCardListItem: CreditCardListItem,
ValuesListItem: ValuesListItem,
« no previous file with comments | « chrome/browser/resources/options/autofill_options.js ('k') | chrome/browser/resources/options/chromeos/accounts_user_list.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698