| Index: chrome/browser/resources/options2/cookies_list.js
|
| diff --git a/chrome/browser/resources/options2/cookies_list.js b/chrome/browser/resources/options2/cookies_list.js
|
| index e887ca04bacda65936d6c6916179fc50819ec4d7..fa9c16ed6356d6fea5e1dd2feed72fdefc96a7cc 100644
|
| --- a/chrome/browser/resources/options2/cookies_list.js
|
| +++ b/chrome/browser/resources/options2/cookies_list.js
|
| @@ -626,8 +626,7 @@ cr.define('options', function() {
|
| decorate: function() {
|
| DeletableItemList.prototype.decorate.call(this);
|
| this.classList.add('cookie-list');
|
| - this.data_ = [];
|
| - this.dataModel = new ArrayDataModel(this.data_);
|
| + this.dataModel = new ArrayDataModel([]);
|
| this.addEventListener('keydown', this.handleKeyLeftRight_.bind(this));
|
| var sm = new ListSingleSelectionModel();
|
| sm.addEventListener('change', this.cookieSelectionChange_.bind(this));
|
| @@ -751,7 +750,7 @@ cr.define('options', function() {
|
| // from options.DeletableItemList
|
| /** @inheritDoc */
|
| deleteItemAtIndex: function(index) {
|
| - var item = this.data_[index];
|
| + var item = this.dataModel.item(index);
|
| if (item) {
|
| var pathId = item.pathId;
|
| if (pathId)
|
| @@ -775,7 +774,7 @@ cr.define('options', function() {
|
| * @param {number} index The index of the tree node to remove.
|
| */
|
| remove: function(index) {
|
| - if (index < this.data_.length)
|
| + if (index < this.dataModel.length)
|
| this.dataModel.splice(index, 1);
|
| },
|
|
|
| @@ -786,8 +785,7 @@ cr.define('options', function() {
|
| */
|
| clear: function() {
|
| parentLookup = {};
|
| - this.data_ = [];
|
| - this.dataModel = new ArrayDataModel(this.data_);
|
| + this.dataModel.splice(0, this.dataModel.length);
|
| this.redraw();
|
| },
|
|
|
|
|