Index: chrome/browser/resources/md_history/history_item.js |
diff --git a/chrome/browser/resources/md_history/history_item.js b/chrome/browser/resources/md_history/history_item.js |
index e312a796c19541d489a2b396674397eb7ae03913..0e7bafc48cd947f754a044d76fd4fac7309d621d 100644 |
--- a/chrome/browser/resources/md_history/history_item.js |
+++ b/chrome/browser/resources/md_history/history_item.js |
@@ -289,18 +289,16 @@ cr.define('md_history', function() { |
}, |
/** |
- * Generates the title for this history card. |
* @param {number} numberOfItems The number of items in the card. |
+ * @param {string} historyDate Date of the current result. |
* @param {string} search The search term associated with these results. |
+ * @return {string} The title for this history card. |
* @private |
*/ |
cardTitle_: function(numberOfItems, historyDate, search) { |
if (!search) |
return this.item.dateRelativeDay; |
- |
- var resultId = numberOfItems == 1 ? 'searchResult' : 'searchResults'; |
- return loadTimeData.getStringF('foundSearchResults', numberOfItems, |
- loadTimeData.getString(resultId), search); |
+ return HistoryItem.searchResultsTitle(numberOfItems, search); |
}, |
}); |
@@ -311,7 +309,6 @@ cr.define('md_history', function() { |
* @param {number} currentIndex |
* @param {string} searchedTerm |
* @return {boolean} Whether or not time gap separator is required. |
- * @private |
*/ |
HistoryItem.needsTimeGap = function(visits, currentIndex, searchedTerm) { |
if (currentIndex >= visits.length - 1 || visits.length == 0) |
@@ -327,5 +324,16 @@ cr.define('md_history', function() { |
currentItem.dateRelativeDay == nextItem.dateRelativeDay; |
}; |
+ /** |
+ * @param {number} numberOfItems |
Dan Beam
2016/10/05 01:34:48
nit: numberOfResults
tsergeant
2016/10/05 01:57:32
Done.
|
+ * @param {string} search |
Dan Beam
2016/10/05 01:34:48
nit: searchTerm
tsergeant
2016/10/05 01:57:32
Done.
|
+ * @return {string} The title for a page of search results. |
+ */ |
+ HistoryItem.searchResultsTitle = function(numberOfItems, search) { |
+ var resultId = numberOfItems == 1 ? 'searchResult' : 'searchResults'; |
+ return loadTimeData.getStringF('foundSearchResults', numberOfItems, |
+ loadTimeData.getString(resultId), search); |
+ }; |
+ |
return { HistoryItem: HistoryItem }; |
}); |