diff options
author | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-24 07:27:42 +0000 |
---|---|---|
committer | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-24 07:27:42 +0000 |
commit | c32d31eab915dcff1f128bf744ced2ad8fa221ef (patch) | |
tree | 69a8fbf3b9360c6401bb4658893cafc4b2f209ed /chrome/browser/search_engines/template_url.cc | |
parent | 6ee50a8d443f48e70921a8eed76f26a6e9844228 (diff) | |
download | chromium_src-c32d31eab915dcff1f128bf744ced2ad8fa221ef.zip chromium_src-c32d31eab915dcff1f128bf744ced2ad8fa221ef.tar.gz chromium_src-c32d31eab915dcff1f128bf744ced2ad8fa221ef.tar.bz2 |
Cleanup AdjustStringForLocaleDirection() to modify input parameter in place.
As described in the bug, the current behavior is confusing and bug-prone.
BUG=47194
TEST=Check that there are no visible regressions in RTL and LTR language UIs on Linux & Windows.
Review URL: http://codereview.chromium.org/5154009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67237 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/search_engines/template_url.cc')
-rw-r--r-- | chrome/browser/search_engines/template_url.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/chrome/browser/search_engines/template_url.cc b/chrome/browser/search_engines/template_url.cc index 48f5d7d..c1ebf517 100644 --- a/chrome/browser/search_engines/template_url.cc +++ b/chrome/browser/search_engines/template_url.cc @@ -578,11 +578,9 @@ TemplateURL::~TemplateURL() { } std::wstring TemplateURL::AdjustedShortNameForLocaleDirection() const { - std::wstring bidi_safe_short_name; - if (base::i18n::AdjustStringForLocaleDirection(short_name_, - &bidi_safe_short_name)) - return bidi_safe_short_name; - return short_name_; + std::wstring bidi_safe_short_name = short_name_; + base::i18n::AdjustStringForLocaleDirection(&bidi_safe_short_name); + return bidi_safe_short_name; } void TemplateURL::SetSuggestionsURL(const std::string& suggestions_url, |