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

Unified Diff: ui/app_list/app_list_view.cc

Issue 10832232: app_list: Fix blank search results caused by whitespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/app_list_view.cc
diff --git a/ui/app_list/app_list_view.cc b/ui/app_list/app_list_view.cc
index c93adbdbc80c759dad9339b58055caf1b96679cc..e3d823b584f37f7b5143dc7a99f4b709e2a1db70 100644
--- a/ui/app_list/app_list_view.cc
+++ b/ui/app_list/app_list_view.cc
@@ -4,6 +4,7 @@
#include "ui/app_list/app_list_view.h"
+#include "base/string_util.h"
#include "ui/app_list/app_list_bubble_border.h"
#include "ui/app_list/app_list_item_view.h"
#include "ui/app_list/app_list_model.h"
@@ -174,7 +175,9 @@ gfx::Rect AppListView::GetBubbleBounds() {
}
void AppListView::QueryChanged(SearchBoxView* sender) {
- bool should_show_search = !model_->search_box()->text().empty();
+ string16 query;
+ TrimWhitespace(model_->search_box()->text(), TRIM_ALL, &query);
+ bool should_show_search = !query.empty();
contents_view_->ShowSearchResults(should_show_search);
if (delegate_.get()) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698