| Index: chrome/browser/resources/md_history/router.js
|
| diff --git a/chrome/browser/resources/md_history/router.js b/chrome/browser/resources/md_history/router.js
|
| index 38c5f0514ebf4753273f7914efed353b552ced9e..b20d4e2f1111002f9221ad2fe8bfe911d8a40c58 100644
|
| --- a/chrome/browser/resources/md_history/router.js
|
| +++ b/chrome/browser/resources/md_history/router.js
|
| @@ -15,8 +15,6 @@ Polymer({
|
| /** @type {QueryState} */
|
| queryState: Object,
|
|
|
| - grouped: Boolean,
|
| -
|
| path_: String,
|
|
|
| queryParams_: Object,
|
| @@ -44,20 +42,12 @@ Polymer({
|
| serializeUrl: function() {
|
| var path = this.selectedPage;
|
|
|
| - if (path == 'history' && this.queryState.range != HistoryRange.ALL_TIME)
|
| - path += '/' + this.rangeToString_(this.queryState.range);
|
| -
|
| if (path == 'history')
|
| path = '';
|
|
|
| - var offsetParam = null;
|
| - if (this.selectedPage == 'history' && this.queryState.groupedOffset)
|
| - offsetParam = this.queryState.groupedOffset;
|
| -
|
| // Make all modifications at the end of the method so observers can't change
|
| // the outcome.
|
| this.path_ = '/' + path;
|
| - this.set('queryParams_.offset', offsetParam);
|
| this.set('queryParams_.q', this.queryState.searchTerm || null);
|
| },
|
|
|
| @@ -76,13 +66,6 @@ Polymer({
|
| var sections = this.path_.substr(1).split('/');
|
| var page = sections[0] || 'history';
|
|
|
| - if (page == 'history' && this.grouped) {
|
| - var range = sections.length > 1 ? this.stringToRange_(sections[1]) :
|
| - HistoryRange.ALL_TIME;
|
| - changes.range = range;
|
| - changes.offset = Number(this.queryParams_.offset) || 0;
|
| - }
|
| -
|
| changes.search = this.queryParams_.q || '';
|
|
|
| // Must change selectedPage before `change-query`, otherwise the
|
| @@ -101,34 +84,4 @@ Polymer({
|
| // changes get processed together.
|
| this.debounce('parseUrl', this.parseUrl_.bind(this));
|
| },
|
| -
|
| - /**
|
| - * @param {!HistoryRange} range
|
| - * @return {string}
|
| - */
|
| - rangeToString_: function(range) {
|
| - switch (range) {
|
| - case HistoryRange.WEEK:
|
| - return 'week';
|
| - case HistoryRange.MONTH:
|
| - return 'month';
|
| - default:
|
| - return '';
|
| - }
|
| - },
|
| -
|
| - /**
|
| - * @param {string} str
|
| - * @return {HistoryRange}
|
| - */
|
| - stringToRange_: function(str) {
|
| - switch (str) {
|
| - case 'week':
|
| - return HistoryRange.WEEK;
|
| - case 'month':
|
| - return HistoryRange.MONTH;
|
| - default:
|
| - return HistoryRange.ALL_TIME;
|
| - }
|
| - }
|
| });
|
|
|