summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete
diff options
context:
space:
mode:
authorxji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-21 17:27:47 +0000
committerxji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-21 17:27:47 +0000
commitbed9bd6cf3f489a1abf040accca3011b170cb471 (patch)
tree771a58a4ebbd5df8b5a6984ce066f79f0412a648 /chrome/browser/autocomplete
parent6c2779d1e0fa36723ac97647fce6f3dd013c6c24 (diff)
downloadchromium_src-bed9bd6cf3f489a1abf040accca3011b170cb471.zip
chromium_src-bed9bd6cf3f489a1abf040accca3011b170cb471.tar.gz
chromium_src-bed9bd6cf3f489a1abf040accca3011b170cb471.tar.bz2
This CL fix issue 2674 - search engine name containing parenthesis is not displayed correctly in Omnibox
NavSuggest drop-down list. The fix is to adjust the search engine name according to locale direction so that the search engine name containing parenthesis are marked with RLE-PDF to be displayed correctly in RTL UI. BUG=2674 Review URL: http://codereview.chromium.org/79005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14119 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete')
-rw-r--r--chrome/browser/autocomplete/keyword_provider.cc2
-rw-r--r--chrome/browser/autocomplete/search_provider.cc5
2 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/autocomplete/keyword_provider.cc b/chrome/browser/autocomplete/keyword_provider.cc
index 67f4edd..b546c92 100644
--- a/chrome/browser/autocomplete/keyword_provider.cc
+++ b/chrome/browser/autocomplete/keyword_provider.cc
@@ -193,7 +193,7 @@ void KeywordProvider::FillInURLAndContents(
if (element->url()->SupportsReplacement()) {
// No query input; return a generic, no-destination placeholder.
match->contents.assign(l10n_util::GetStringF(IDS_KEYWORD_SEARCH,
- element->short_name(),
+ element->AdjustedShortNameForLocaleDirection(),
l10n_util::GetString(IDS_EMPTY_KEYWORD_VALUE)));
match->contents_class.push_back(
ACMatchClassification(0, ACMatchClassification::DIM));
diff --git a/chrome/browser/autocomplete/search_provider.cc b/chrome/browser/autocomplete/search_provider.cc
index 1c1dccdf..1099efc 100644
--- a/chrome/browser/autocomplete/search_provider.cc
+++ b/chrome/browser/autocomplete/search_provider.cc
@@ -90,7 +90,8 @@ void SearchProvider::Start(const AutocompleteInput& input,
static const std::wstring kNoQueryInput(
l10n_util::GetString(IDS_AUTOCOMPLETE_NO_QUERY));
match.contents.assign(l10n_util::GetStringF(
- IDS_AUTOCOMPLETE_SEARCH_CONTENTS, default_provider->short_name(),
+ IDS_AUTOCOMPLETE_SEARCH_CONTENTS,
+ default_provider->AdjustedShortNameForLocaleDirection(),
kNoQueryInput));
match.contents_class.push_back(
ACMatchClassification(0, ACMatchClassification::DIM));
@@ -327,7 +328,7 @@ void SearchProvider::OnGotMostRecentKeywordSearchTerms(
profile_->GetHistoryService(Profile::EXPLICIT_ACCESS);
DCHECK(history_service);
if (providers_.valid_keyword_provider() &&
- (providers_.keyword_provider().id() ==
+ (providers_.keyword_provider().id() ==
history_request_consumer_.GetClientData(history_service, handle))) {
keyword_history_results_ = *results;
} else {