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)); |