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

Unified Diff: chrome/browser/resources/options2/cookies_list.js

Issue 10096013: Merge 132375 - Fix cookies list. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1084/src/
Patch Set: Created 8 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/options2/cookies_list.js
===================================================================
--- chrome/browser/resources/options2/cookies_list.js (revision 132401)
+++ chrome/browser/resources/options2/cookies_list.js (working copy)
@@ -614,8 +614,7 @@
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));
@@ -739,7 +738,7 @@
// 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)
@@ -763,7 +762,7 @@
* @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);
},
@@ -774,8 +773,7 @@
*/
clear: function() {
parentLookup = {};
- this.data_ = [];
- this.dataModel = new ArrayDataModel(this.data_);
+ this.dataModel.splice(0, this.dataModel.length);
this.redraw();
},
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698