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

Unified Diff: ui/app_list/search_controller.cc

Issue 796293002: App list voice searches now prioritize exact-match web results. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit. Created 6 years 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 | « ui/app_list/search_controller.h ('k') | ui/app_list/search_result.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/search_controller.cc
diff --git a/ui/app_list/search_controller.cc b/ui/app_list/search_controller.cc
index 3a4a52f59c2d96b45c1bda7c3efaf807e00f8eb2..f4960e12715a72886c81952900ca20d1b8ff3806 100644
--- a/ui/app_list/search_controller.cc
+++ b/ui/app_list/search_controller.cc
@@ -28,17 +28,18 @@ namespace app_list {
SearchController::SearchController(SearchBoxModel* search_box,
AppListModel::SearchResults* results,
History* history)
- : search_box_(search_box),
- dispatching_query_(false),
- mixer_(new Mixer(results)),
- history_(history) {
+ : search_box_(search_box),
+ dispatching_query_(false),
+ mixer_(new Mixer(results)),
+ history_(history),
+ is_voice_query_(false) {
mixer_->Init();
}
SearchController::~SearchController() {
}
-void SearchController::Start() {
+void SearchController::Start(bool is_voice_query) {
Stop();
base::string16 query;
@@ -52,6 +53,8 @@ void SearchController::Start() {
}
dispatching_query_ = false;
+ is_voice_query_ = is_voice_query;
+
OnResultsChanged();
stop_timer_.Start(FROM_HERE,
@@ -108,7 +111,7 @@ void SearchController::OnResultsChanged() {
->swap(known_results);
}
- mixer_->MixAndPublish(known_results);
+ mixer_->MixAndPublish(is_voice_query_, known_results);
}
} // namespace app_list
« no previous file with comments | « ui/app_list/search_controller.h ('k') | ui/app_list/search_result.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698