Chromium Code Reviews| 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 Polymer({ | 5 Polymer({ |
| 6 is: 'history-toolbar', | 6 is: 'history-toolbar', |
| 7 properties: { | 7 properties: { |
| 8 // Number of history items currently selected. | 8 // Number of history items currently selected. |
| 9 // TODO(calamity): bind this to | 9 // TODO(calamity): bind this to |
| 10 // listContainer.selectedItem.selectedPaths.length. | 10 // listContainer.selectedItem.selectedPaths.length. |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 136 }, | 136 }, |
| 137 | 137 |
| 138 /** @private */ | 138 /** @private */ |
| 139 numberOfItemsSelected_: function(count) { | 139 numberOfItemsSelected_: function(count) { |
| 140 return count > 0 ? loadTimeData.getStringF('itemsSelected', count) : ''; | 140 return count > 0 ? loadTimeData.getStringF('itemsSelected', count) : ''; |
| 141 }, | 141 }, |
| 142 | 142 |
| 143 /** @private */ | 143 /** @private */ |
| 144 getHistoryInterval_: function() { | 144 getHistoryInterval_: function() { |
| 145 var info = this.queryInfo; | 145 var info = this.queryInfo; |
| 146 if (!info) | |
| 147 return; | |
|
calamity
2017/01/27 03:47:34
When can this happen?
tsergeant
2017/01/30 02:13:14
It gets called when queryResult.info is set to nul
| |
| 148 | |
| 146 if (this.groupedRange == HistoryRange.WEEK) | 149 if (this.groupedRange == HistoryRange.WEEK) |
| 147 return info.queryInterval; | 150 return info.queryInterval; |
| 148 | 151 |
| 149 if (this.groupedRange == HistoryRange.MONTH) | 152 if (this.groupedRange == HistoryRange.MONTH) |
| 150 return info.queryStartMonth; | 153 return info.queryStartMonth; |
| 151 }, | 154 }, |
| 152 | 155 |
| 153 /** | 156 /** |
| 154 * @param {Event} e | 157 * @param {Event} e |
| 155 * @private | 158 * @private |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 184 }, | 187 }, |
| 185 | 188 |
| 186 /** | 189 /** |
| 187 * @private | 190 * @private |
| 188 * @return {boolean} | 191 * @return {boolean} |
| 189 */ | 192 */ |
| 190 isToday_: function() { | 193 isToday_: function() { |
| 191 return this.groupedOffset == 0; | 194 return this.groupedOffset == 0; |
| 192 }, | 195 }, |
| 193 }); | 196 }); |
| OLD | NEW |