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

Unified Diff: base/i18n/rtl.cc

Issue 3108027: Convert GetDisplayStringInLTRDirectionality from wstring to string16. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 4 months 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: base/i18n/rtl.cc
diff --git a/base/i18n/rtl.cc b/base/i18n/rtl.cc
index 6c3d39483834b7d1e3ddad419e5c3f5e5e5a7944..f5381a221e811ad0a59a667434d84d56dd3fc0c6 100644
--- a/base/i18n/rtl.cc
+++ b/base/i18n/rtl.cc
@@ -269,10 +269,12 @@ void WrapPathWithLTRFormatting(const FilePath& path,
rtl_safe_path->push_back(kPopDirectionalFormatting);
}
-std::wstring GetDisplayStringInLTRDirectionality(std::wstring* text) {
- if (IsRTL())
- WrapStringWithLTRFormatting(text);
- return *text;
+string16 GetDisplayStringInLTRDirectionality(const string16& text) {
+ if (!IsRTL())
+ return text;
+ string16 text_mutable(text);
+ WrapStringWithLTRFormatting(&text_mutable);
+ return text_mutable;
}
const string16 StripWrappingBidiControlCharacters(const string16& text) {

Powered by Google App Engine
This is Rietveld 408576698