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

Unified Diff: views/controls/button/native_button.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: views/controls/button/native_button.cc
diff --git a/views/controls/button/native_button.cc b/views/controls/button/native_button.cc
index 89dae9c24d70f60f59237c88c4a67ee5f1ec93cc..e1693d35a97b370c50c20a9ad8294296bd50d384 100644
--- a/views/controls/button/native_button.cc
+++ b/views/controls/button/native_button.cc
@@ -74,9 +74,7 @@ void NativeButton::SetLabel(const std::wstring& label) {
// In order to overcome this problem, we mark the localized Hebrew strings as
// RTL strings explicitly (using the appropriate Unicode formatting) so that
// Windows displays the text correctly regardless of the HWND hierarchy.
- std::wstring localized_label;
- if (base::i18n::AdjustStringForLocaleDirection(label_, &localized_label))
- label_ = localized_label;
+ base::i18n::AdjustStringForLocaleDirection(&label_);
if (native_wrapper_)
native_wrapper_->UpdateLabel();

Powered by Google App Engine
This is Rietveld 408576698