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

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

Issue 16019014: Remove "Search" suffix from omnibox search engine match (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restrict removal to extension keywords Created 7 years, 7 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/autocomplete/autocomplete_controller.cc
diff --git a/chrome/browser/autocomplete/autocomplete_controller.cc b/chrome/browser/autocomplete/autocomplete_controller.cc
index 061542eb2157e0e4c66347a8cd150c07dd7c5ff9..89a4d5a55fa99a24ed4c6d42474424f841340bc1 100644
--- a/chrome/browser/autocomplete/autocomplete_controller.cc
+++ b/chrome/browser/autocomplete/autocomplete_controller.cc
@@ -561,9 +561,15 @@ void AutocompleteController::UpdateKeywordDescriptions(
if (i->keyword != last_keyword) {
const TemplateURL* template_url = i->GetTemplateURL(profile_, false);
if (template_url) {
- i->description = l10n_util::GetStringFUTF16(
- IDS_AUTOCOMPLETE_SEARCH_DESCRIPTION,
- template_url->AdjustedShortNameForLocaleDirection());
+ // Don't add the "Search" suffix for extension keywords.
Peter Kasting 2013/05/29 21:07:20 Nit: Shorter but with a more descriptive comment:
Aaron Jacobs 2013/05/29 21:27:21 Done.
+ if (template_url->IsExtensionKeyword()) {
+ i->description =
+ template_url->AdjustedShortNameForLocaleDirection();
+ } else {
+ i->description = l10n_util::GetStringFUTF16(
+ IDS_AUTOCOMPLETE_SEARCH_DESCRIPTION,
+ template_url->AdjustedShortNameForLocaleDirection());
+ }
i->description_class.push_back(
ACMatchClassification(0, ACMatchClassification::DIM));
}
« 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