| 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 8a4ae577c02f4d747b0f37eddc89e8d827ab04ff..bcf02b90c7c13970dfb48d5ade6ef60c89b3d6d6 100644
|
| --- a/chrome/browser/resources/options2/cookies_list.js
|
| +++ b/chrome/browser/resources/options2/cookies_list.js
|
| @@ -605,6 +605,11 @@ cr.define('options', function() {
|
| var parent = this.parent;
|
| if (parent && parent instanceof CookieTreeNode)
|
| return parent.pathId + ',' + this.data.id;
|
| + // TODO(nasko): until the code is modified to account for the "app" level
|
| + // in the tree model, use this hack of adding the root node id.
|
| + if ($('cookies-list').rootId) {
|
| + return $('cookies-list').rootId + ',' + this.data.id;
|
| + }
|
| return this.data.id;
|
| },
|
| };
|
| @@ -826,8 +831,15 @@ cr.define('options', function() {
|
| */
|
| removeByParentId: function(parentId, start, count) {
|
| var parent = parentId ? parentLookup[parentId] : this;
|
| - if (!parent)
|
| - return;
|
| + if (!parent) {
|
| + // TODO(nasko): Remove this once the "app" level in the tree model is
|
| + // accounted for.
|
| + if (parentId) {
|
| + parent = this;
|
| + } else {
|
| + return;
|
| + }
|
| + }
|
|
|
| parent.startBatchUpdates();
|
| while (count-- > 0)
|
| @@ -847,8 +859,15 @@ cr.define('options', function() {
|
| if (parentId)
|
| delete lookupRequests[parentId];
|
| var parent = parentId ? parentLookup[parentId] : this;
|
| - if (!parent)
|
| - return;
|
| + // TODO(nasko): Remove this once the "app" level in the tree model is
|
| + // accounted for.
|
| + if (!parent) {
|
| + if (parentId) {
|
| + parent = this;
|
| + } else {
|
| + return;
|
| + }
|
| + }
|
|
|
| parent.startBatchUpdates();
|
| parent.clear();
|
|
|