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

Unified Diff: chrome/browser/ui/search/instant_controller.cc

Issue 13963014: Local omnibox treats navsuggest suggestions as queries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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: chrome/browser/ui/search/instant_controller.cc
diff --git a/chrome/browser/ui/search/instant_controller.cc b/chrome/browser/ui/search/instant_controller.cc
index 83f1e345833a15ef85e88f0bd2df06d9dfbae3a5..34f4525e17084a2ec05de5756a4f7ef2390f0f8e 100644
--- a/chrome/browser/ui/search/instant_controller.cc
+++ b/chrome/browser/ui/search/instant_controller.cc
@@ -572,8 +572,15 @@ void InstantController::HandleAutocompleteResults(
result.type = UTF8ToUTF16(AutocompleteMatch::TypeToString(match->type));
result.description = match->description;
result.destination_url = UTF8ToUTF16(match->destination_url.spec());
- if (from_search_provider)
+
+ // If the search query should be displayed.
+ if (from_search_provider &&
+ (match->type == AutocompleteMatch::SEARCH_WHAT_YOU_TYPED ||
+ match->type == AutocompleteMatch::SEARCH_HISTORY ||
+ match->type == AutocompleteMatch::SEARCH_SUGGEST ||
+ match->type == AutocompleteMatch::SEARCH_OTHER_ENGINE))
sreeram 2013/04/16 17:28:27 Why not just AutocompleteMatch::IsSearchType()? I
samarth 2013/04/17 00:39:13 Sreeram: do you have any ideas for how to write a
sreeram 2013/04/17 01:29:14 How about something like this: SetOmniboxText(
dougw 2013/04/19 01:11:09 Done.
dougw 2013/04/19 01:11:09 Done.
dougw 2013/04/22 16:08:53 Done.
result.search_query = match->contents;
+
result.transition = match->transition;
result.relevance = match->relevance;
DVLOG(1) << " " << result.relevance << " " << result.type << " "
« 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