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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 this.addWebUIListener( | 48 this.addWebUIListener( |
49 'onTreeItemRemoved', this.getCookieDetails_.bind(this)); | 49 'onTreeItemRemoved', this.getCookieDetails_.bind(this)); |
50 }, | 50 }, |
51 | 51 |
52 /** | 52 /** |
53 * settings.RouteObserverBehavior | 53 * settings.RouteObserverBehavior |
54 * @param {!settings.Route} route | 54 * @param {!settings.Route} route |
55 * @protected | 55 * @protected |
56 */ | 56 */ |
57 currentRouteChanged: function(route) { | 57 currentRouteChanged: function(route) { |
58 if (settings.getCurrentRoute() != settings.Route.SITE_SETTINGS_DATA_DETAILS) | 58 if (settings.getCurrentRoute() != |
| 59 settings.routes.SITE_SETTINGS_DATA_DETAILS) |
59 return; | 60 return; |
60 var site = settings.getQueryParameters().get('site'); | 61 var site = settings.getQueryParameters().get('site'); |
61 if (!site || site == this.site_) | 62 if (!site || site == this.site_) |
62 return; | 63 return; |
63 this.site_ = site; | 64 this.site_ = site; |
64 this.pageTitle = loadTimeData.getStringF('siteSettingsCookieSubpage', site); | 65 this.pageTitle = loadTimeData.getStringF('siteSettingsCookieSubpage', site); |
65 this.getCookieDetails_(); | 66 this.getCookieDetails_(); |
66 }, | 67 }, |
67 | 68 |
68 /** @private */ | 69 /** @private */ |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 | 134 |
134 /** | 135 /** |
135 * A handler for when the user opts to remove all cookies. | 136 * A handler for when the user opts to remove all cookies. |
136 */ | 137 */ |
137 removeAll: function() { | 138 removeAll: function() { |
138 this.browserProxy_.removeCookie(this.siteId_); | 139 this.browserProxy_.removeCookie(this.siteId_); |
139 }, | 140 }, |
140 }); | 141 }); |
141 | 142 |
142 })(); | 143 })(); |
OLD | NEW |