Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5750)

Unified Diff: chrome/browser/resources/md_history/list_container.js

Issue 2068613002: [MD History] Add URL parameter for search. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@routing
Patch Set: remove_var Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/md_history/app.js ('k') | chrome/browser/resources/md_history/side_bar.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/md_history/list_container.js
diff --git a/chrome/browser/resources/md_history/list_container.js b/chrome/browser/resources/md_history/list_container.js
index f8bbac03555fd47d47270079290d4d7d36a0b348..f8e5507781cd864ee40693527c8eaf999292d37e 100644
--- a/chrome/browser/resources/md_history/list_container.js
+++ b/chrome/browser/resources/md_history/list_container.js
@@ -20,7 +20,6 @@ Polymer({
},
observers: [
- 'searchTermChanged_(queryState.searchTerm)',
'groupedRangeChanged_(queryState.range)',
],
@@ -54,9 +53,12 @@ Polymer({
*/
queryHistory: function(incremental) {
var queryState = this.queryState;
- // Disable querying until the first set of results have been returned.
- if (!this.queryResult || this.queryResult.results == null ||
- queryState.queryingDisabled) {
+ // Disable querying until the first set of results have been returned. If
+ // there is a search, query immediately to support search query params from
+ // the URL.
+ var noResults = !this.queryResult || this.queryResult.results == null;
+ if (queryState.queryingDisabled ||
+ (!this.queryState.searchTerm && noResults)) {
return;
}
@@ -95,12 +97,6 @@ Polymer({
},
/**
- * @param {string} searchTerm
- * @private
- */
- searchTermChanged_: function(searchTerm) { this.queryHistory(false); },
-
- /**
* @param {HistoryRange} range
* @private
*/
« no previous file with comments | « chrome/browser/resources/md_history/app.js ('k') | chrome/browser/resources/md_history/side_bar.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698