Chromium Code Reviews| Index: chrome/browser/ui/app_list/search/search_controller.cc |
| diff --git a/chrome/browser/ui/app_list/search/search_controller.cc b/chrome/browser/ui/app_list/search/search_controller.cc |
| index 86de7d01403ebfb21902570492cf3aa8bab5268f..0cbbf9e2e485a92b658bb3c4a707360c1db3080d 100644 |
| --- a/chrome/browser/ui/app_list/search/search_controller.cc |
| +++ b/chrome/browser/ui/app_list/search/search_controller.cc |
| @@ -91,6 +91,23 @@ void SearchController::Init() { |
| } |
| } |
| +void SearchController::FetchRecommendations() { |
| + Stop(); |
| + |
| + list_controller_->OnSearchStarted(); |
| + |
| + dispatching_query_ = true; |
| + for (Providers::iterator it = providers_.begin(); |
| + it != providers_.end(); |
| + ++it) { |
| + (*it)->FetchRecommendations(); |
| + } |
| + dispatching_query_ = false; |
| + |
| + OnResultsChanged(); |
| + InitiateStopTimer(); |
| +} |
| + |
| void SearchController::Start() { |
| Stop(); |
| @@ -108,7 +125,10 @@ void SearchController::Start() { |
| dispatching_query_ = false; |
| OnResultsChanged(); |
| + InitiateStopTimer(); |
| +} |
| +void SearchController::InitiateStopTimer() { |
| // Maximum time (in milliseconds) to wait to the search providers to finish. |
| const int kStopTimeMS = 1500; |
|
Matt Giuca
2014/07/22 04:31:07
nit: This constant should be more visible -- at le
calamity
2014/07/22 07:24:04
Done.
|
| stop_timer_.Start(FROM_HERE, |