Chromium Code Reviews| Index: chrome/browser/resources/history/history.js |
| diff --git a/chrome/browser/resources/history/history.js b/chrome/browser/resources/history/history.js |
| index 6c18a61a5bd88413d3673a357f6123659fb06e2d..5111603cdc12b953f062dae434e40f31c925e72f 100644 |
| --- a/chrome/browser/resources/history/history.js |
| +++ b/chrome/browser/resources/history/history.js |
| @@ -187,7 +187,7 @@ Visit.prototype.getResultDOM = function(propertyBag) { |
| var entryBox = createElementWithClassName('div', 'entry-box'); |
| var domain = createElementWithClassName('div', 'domain'); |
| - this.id_ = this.model_.nextVisitId_++; |
| + this.id_ = this.model_.getNextVisitId(); |
| var self = this; |
| // Only create the checkbox if it can be used either to delete an entry or to |
| @@ -196,9 +196,11 @@ Visit.prototype.getResultDOM = function(propertyBag) { |
| var checkbox = document.createElement('input'); |
| checkbox.type = 'checkbox'; |
| checkbox.id = 'checkbox-' + this.id_; |
| - checkbox.setAttribute('aria-label', |
| - loadTimeData.getString('removeFromHistory')); |
| checkbox.time = this.date.getTime(); |
| + |
| + var summaryFields = [this.dateTimeOfDay, this.title_, this.domain_]; |
| + checkbox.setAttribute('aria-label', summaryFields.join('\n')); |
|
dmazzoni
2014/10/21 05:11:33
Maybe join with comma and space? This will get ren
Dan Beam
2014/10/21 05:14:03
This was the only way that I thought would have a
|
| + |
| checkbox.addEventListener('click', checkboxClicked); |
| entryBox.appendChild(checkbox); |
| @@ -743,6 +745,14 @@ HistoryModel.prototype.removeVisit = function(visit) { |
| this.visits_.splice(index, 1); |
| }; |
| +/** |
| + * Automatically generates a new visit ID. |
| + * @return {number} The next visit ID. |
| + */ |
| +HistoryModel.prototype.getNextVisitId = function() { |
| + return this.nextVisitId_++; |
| +}; |
| + |
| // HistoryModel, Private: ----------------------------------------------------- |
| /** |