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

Unified Diff: chrome/browser/autocomplete/keyword_provider.cc

Issue 6731036: Enabled pressing TAB to cycle through the Omnibox results. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 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
Index: chrome/browser/autocomplete/keyword_provider.cc
===================================================================
--- chrome/browser/autocomplete/keyword_provider.cc (revision 80868)
+++ chrome/browser/autocomplete/keyword_provider.cc (working copy)
@@ -179,11 +179,12 @@
!remaining_input.empty(),
&keyword_matches);
- // Prune any extension keywords that are disallowed in incognito mode (if
- // we're incognito), or disabled.
for (std::vector<string16>::iterator i(keyword_matches.begin());
i != keyword_matches.end(); ) {
const TemplateURL* template_url(model->GetTemplateURLForKeyword(*i));
+
+ // Prune any extension keywords that are disallowed in incognito mode (if
+ // we're incognito), or disabled.
if (profile_ &&
input.matches_requested() == AutocompleteInput::ALL_MATCHES &&
template_url->IsExtensionKeyword()) {
@@ -198,6 +199,13 @@
continue;
}
}
+
+ // Prune any substituting keywords if there is no substitution.
+ if (TemplateURL::SupportsReplacement(template_url) &&
+ !input.allow_exact_keyword_match()) {
+ i = keyword_matches.erase(i);
+ continue;
+ }
++i;
Peter Kasting 2011/04/11 23:17:33 Nit: Add blank line before this
}
if (keyword_matches.empty())

Powered by Google App Engine
This is Rietveld 408576698