summaryrefslogtreecommitdiffstats
path: root/chrome/browser/search_engines
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/search_engines
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/search_engines')
-rw-r--r--chrome/browser/search_engines/template_url.cc8
-rw-r--r--chrome/browser/search_engines/template_url.h2
2 files changed, 10 insertions, 0 deletions
diff --git a/chrome/browser/search_engines/template_url.cc b/chrome/browser/search_engines/template_url.cc
index 72ffc6d..b73bdd0 100644
--- a/chrome/browser/search_engines/template_url.cc
+++ b/chrome/browser/search_engines/template_url.cc
@@ -496,6 +496,14 @@ bool TemplateURL::SupportsReplacement(const TemplateURL* turl) {
return turl && turl->url() && turl->url()->SupportsReplacement();
}
+std::wstring TemplateURL::AdjustedShortNameForLocaleDirection() const {
+ std::wstring bidi_safe_short_name;
+ if (l10n_util::AdjustStringForLocaleDirection(short_name_,
+ &bidi_safe_short_name))
+ return bidi_safe_short_name;
+ return short_name_;
+}
+
void TemplateURL::SetSuggestionsURL(const std::wstring& suggestions_url,
int index_offset,
int page_offset) {
diff --git a/chrome/browser/search_engines/template_url.h b/chrome/browser/search_engines/template_url.h
index 983621a..e6f2b65 100644
--- a/chrome/browser/search_engines/template_url.h
+++ b/chrome/browser/search_engines/template_url.h
@@ -272,6 +272,8 @@ class TemplateURL {
}
const std::wstring& short_name() const { return short_name_; }
+ std::wstring AdjustedShortNameForLocaleDirection() const;
+
// A description of the template; this may be empty.
void set_description(const std::wstring& description) {
description_ = description;