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

Unified Diff: chrome/browser/resources/md_downloads/action_service.js

Issue 2284463002: MD Downloads: fix search spinner when terms are the same (Closed)
Patch Set: tsergeant@ review / test fix Created 4 years, 4 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 | « no previous file | chrome/browser/resources/md_downloads/action_service_unittest.gtestjs » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/md_downloads/action_service.js
diff --git a/chrome/browser/resources/md_downloads/action_service.js b/chrome/browser/resources/md_downloads/action_service.js
index e065ee9d97ffde466a8a9b00f098c7d30f8aa495..6c10e035dbb43149082e683b864f6ad8a73aecbd 100644
--- a/chrome/browser/resources/md_downloads/action_service.js
+++ b/chrome/browser/resources/md_downloads/action_service.js
@@ -100,7 +100,10 @@ cr.define('downloads', function() {
*/
saveDangerous: chromeSendWithId('saveDangerous'),
- /** @param {string} searchText What to search for. */
+ /**
+ * @param {string} searchText What to search for.
+ * @return {boolean} Whether |searchText| resulted in new search terms.
+ */
search: function(searchText) {
var searchTerms = ActionService.splitTerms(searchText);
var sameTerms = searchTerms.length == this.searchTerms_.length;
@@ -111,10 +114,11 @@ cr.define('downloads', function() {
}
if (sameTerms)
- return;
+ return false;
this.searchTerms_ = searchTerms;
this.loadMore();
+ return true;
},
/**
« no previous file with comments | « no previous file | chrome/browser/resources/md_downloads/action_service_unittest.gtestjs » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698