| Index: chrome/browser/resources/md_history/history_card.js
|
| diff --git a/chrome/browser/resources/md_history/history_card.js b/chrome/browser/resources/md_history/history_card.js
|
| index 542a6d9ecd8a8645bbd1ffc474d9d8b5d10d2510..826bebe5ff07270659c24cce6344f80fe63f3c53 100644
|
| --- a/chrome/browser/resources/md_history/history_card.js
|
| +++ b/chrome/browser/resources/md_history/history_card.js
|
| @@ -11,11 +11,17 @@ Polymer({
|
| type: String,
|
| value: ''
|
| },
|
| +
|
| // The list of history results that were accessed for a particular day in
|
| // reverse chronological order.
|
| historyItems: {
|
| type: Array,
|
| value: function() { return []; }
|
| + },
|
| +
|
| + searchTerm: {
|
| + type: String,
|
| + value: ''
|
| }
|
| },
|
|
|
| @@ -30,5 +36,24 @@ Polymer({
|
| var items = this.historyItems;
|
| return index + 1 < items.length &&
|
| items[index].time - items[index + 1].time > BROWSING_GAP_TIME;
|
| + },
|
| +
|
| + /**
|
| + * Checks whether the results returned are part of a search.
|
| + * @private
|
| + */
|
| + isNotSearchResult_: function(search) {
|
| + return search == '';
|
| + },
|
| +
|
| + /**
|
| + * Create the title for the history-card holding all the search results.
|
| + * Found <numberOfItems> search result(s) for '<search>'.
|
| + * @private
|
| + */
|
| + searchResultTitle_: function(numberOfItems, search) {
|
| + var resultId = numberOfItems == 1 ? 'searchResult' : 'searchResults';
|
| + return loadTimeData.getStringF('foundSearchResults', numberOfItems,
|
| + loadTimeData.getString(resultId), search);
|
| }
|
| });
|
|
|