| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 * @param {!settings.Route} route | 42 * @param {!settings.Route} route |
| 43 * @protected | 43 * @protected |
| 44 */ | 44 */ |
| 45 currentRouteChanged: function(route) { | 45 currentRouteChanged: function(route) { |
| 46 if (settings.getCurrentRoute() != settings.Route.SITE_SETTINGS_DATA_DETAILS) | 46 if (settings.getCurrentRoute() != settings.Route.SITE_SETTINGS_DATA_DETAILS) |
| 47 return; | 47 return; |
| 48 this.siteTitle_ = settings.getQueryParameters().get('site'); | 48 this.siteTitle_ = settings.getQueryParameters().get('site'); |
| 49 if (!this.siteTitle_) | 49 if (!this.siteTitle_) |
| 50 return; | 50 return; |
| 51 this.loadCookies().then(this.onCookiesLoaded_.bind(this)); | 51 this.loadCookies().then(this.onCookiesLoaded_.bind(this)); |
| 52 this.pageTitle = this.siteTitle_; | 52 this.pageTitle = loadTimeData.getStringF('siteSettingsCookieSubpage', |
| 53 this.siteTitle_); |
| 53 }, | 54 }, |
| 54 | 55 |
| 55 /** | 56 /** |
| 56 * @return {!Array<!CookieDataForDisplay>} | 57 * @return {!Array<!CookieDataForDisplay>} |
| 57 * @private | 58 * @private |
| 58 */ | 59 */ |
| 59 getCookieNodes_: function(cookie) { | 60 getCookieNodes_: function(cookie) { |
| 60 var node = this.rootCookieNode.fetchNodeById(cookie.id, true); | 61 var node = this.rootCookieNode.fetchNodeById(cookie.id, true); |
| 61 if (!node) | 62 if (!node) |
| 62 return []; | 63 return []; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 127 |
| 127 /** | 128 /** |
| 128 * A handler for when the user opts to remove all cookies. | 129 * A handler for when the user opts to remove all cookies. |
| 129 */ | 130 */ |
| 130 removeAll: function() { | 131 removeAll: function() { |
| 131 this.browserProxy.removeCookie(this.site_.data.id); | 132 this.browserProxy.removeCookie(this.site_.data.id); |
| 132 }, | 133 }, |
| 133 }); | 134 }); |
| 134 | 135 |
| 135 })(); | 136 })(); |
| OLD | NEW |