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

Unified Diff: chrome/browser/search_engines/template_url.cc

Issue 5154009: Cleanup AdjustStringForLocaleDirection() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: further fixes Created 10 years, 1 month 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
Index: chrome/browser/search_engines/template_url.cc
diff --git a/chrome/browser/search_engines/template_url.cc b/chrome/browser/search_engines/template_url.cc
index 48f5d7d458334fb08ac846489af8f6d83746a5e4..c1ebf517ab91dd5d6e755339275a1b0680a6f327 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,

Powered by Google App Engine
This is Rietveld 408576698