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

Unified Diff: chrome/browser/resources/settings/settings_main/settings_main.js

Issue 2739323005: MD Settings: Allow search within settings to track multiple requests separately. (Closed)
Patch Set: Address comments. Created 3 years, 9 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
Index: chrome/browser/resources/settings/settings_main/settings_main.js
diff --git a/chrome/browser/resources/settings/settings_main/settings_main.js b/chrome/browser/resources/settings/settings_main/settings_main.js
index 22b4bd86fb2766ef7145bfac11d076b95fbf0639..af79c71c45994a5468c3c37e82b316893cdcad99 100644
--- a/chrome/browser/resources/settings/settings_main/settings_main.js
+++ b/chrome/browser/resources/settings/settings_main/settings_main.js
@@ -254,19 +254,19 @@ Polymer({
setTimeout(function() {
var whenSearchDone =
assert(this.getPage_(settings.Route.BASIC)).searchContents(query);
- whenSearchDone.then(function(request) {
+ whenSearchDone.then(function(result) {
resolve();
- if (!request.finished) {
+ if (result.canceled) {
// Nothing to do here. A previous search request was canceled
- // because a new search request was issued before the first one
- // completed.
+ // because a new search request was issued with a different query
+ // before the previous completed.
return;
}
this.toolbarSpinnerActive = false;
- this.inSearchMode_ = !request.isSame('');
+ this.inSearchMode_ = !result.wasClearSearch;
this.showNoResultsFound_ =
- this.inSearchMode_ && !request.didFindMatches();
+ this.inSearchMode_ && result.didFindMatches;
}.bind(this));
}.bind(this), 0);
}.bind(this));
« no previous file with comments | « chrome/browser/resources/settings/search_settings.js ('k') | chrome/test/data/webui/settings/basic_page_browsertest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698