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

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: Peter's requests 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..2ee28a94541861c71d29f8a8d7e7a47f428cbad9 100644
--- a/chrome/browser/autocomplete/autocomplete_controller.cc
+++ b/chrome/browser/autocomplete/autocomplete_controller.cc
@@ -561,9 +561,14 @@ 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());
+ // For extension keywords, just make the description the extension
+ // name -- don't assume that the normal search keyword description is
+ // applicable.
+ i->description = template_url->AdjustedShortNameForLocaleDirection();
+ if (!template_url->IsExtensionKeyword()) {
+ i->description = l10n_util::GetStringFUTF16(
+ IDS_AUTOCOMPLETE_SEARCH_DESCRIPTION, i->description);
+ }
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