| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 (function() { | 5 (function() { |
| 6 'use strict'; | 6 'use strict'; |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * 'site-data-details-subpage' Display cookie contents. | 9 * 'site-data-details-subpage' Display cookie contents. |
| 10 */ | 10 */ |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 65 |
| 66 /** | 66 /** |
| 67 * settings.RouteObserverBehavior | 67 * settings.RouteObserverBehavior |
| 68 * @private | 68 * @private |
| 69 */ | 69 */ |
| 70 onCookiesLoaded_: function() { | 70 onCookiesLoaded_: function() { |
| 71 var node = this.rootCookieNode.fetchNodeBySite(this.siteTitle_); | 71 var node = this.rootCookieNode.fetchNodeBySite(this.siteTitle_); |
| 72 if (node) { | 72 if (node) { |
| 73 this.site_ = node; | 73 this.site_ = node; |
| 74 this.entries_ = this.site_.getCookieList(); | 74 this.entries_ = this.site_.getCookieList(); |
| 75 // Set up flag for expanding cookie details. |
| 76 this.entries_.map(function(e) { return e.expanded_ = false; }); |
| 75 } else { | 77 } else { |
| 76 this.entries_ = []; | 78 this.entries_ = []; |
| 77 } | 79 } |
| 78 }, | 80 }, |
| 79 | 81 |
| 80 /** | 82 /** |
| 81 * Recursively look up a node path for a leaf node with a given id. | 83 * Recursively look up a node path for a leaf node with a given id. |
| 82 * @param {!settings.CookieTreeNode} node The node to start with. | 84 * @param {!settings.CookieTreeNode} node The node to start with. |
| 83 * @param {string} currentPath The path constructed so far. | 85 * @param {string} currentPath The path constructed so far. |
| 84 * @param {string} targetId The id of the target leaf node to look for. | 86 * @param {string} targetId The id of the target leaf node to look for. |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 128 |
| 127 /** | 129 /** |
| 128 * A handler for when the user opts to remove all cookies. | 130 * A handler for when the user opts to remove all cookies. |
| 129 */ | 131 */ |
| 130 removeAll: function() { | 132 removeAll: function() { |
| 131 this.browserProxy.removeCookie(this.site_.data.id); | 133 this.browserProxy.removeCookie(this.site_.data.id); |
| 132 }, | 134 }, |
| 133 }); | 135 }); |
| 134 | 136 |
| 135 })(); | 137 })(); |
| OLD | NEW |