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

Unified Diff: base/i18n/rtl.cc

Issue 1446363003: Deleted OS_WIN and all Windows specific files from base. (Closed) Base URL: https://github.com/domokit/mojo.git@base_tests
Patch Set: Created 5 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
« no previous file with comments | « base/i18n/icu_util_nacl_win64.cc ('k') | base/json/json_file_value_serializer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/i18n/rtl.cc
diff --git a/base/i18n/rtl.cc b/base/i18n/rtl.cc
index 1cccae289375f92495963cee7bbc9341167a8a48..cb23489b41ead1e8c61dd76f29525665e6112a9f 100644
--- a/base/i18n/rtl.cc
+++ b/base/i18n/rtl.cc
@@ -196,30 +196,6 @@ TextDirection GetStringDirection(const string16& text) {
return result;
}
-#if defined(OS_WIN)
-bool AdjustStringForLocaleDirection(string16* text) {
- if (!IsRTL() || text->empty())
- return false;
-
- // Marking the string as LTR if the locale is RTL and the string does not
- // contain strong RTL characters. Otherwise, mark the string as RTL.
- bool has_rtl_chars = StringContainsStrongRTLChars(*text);
- if (!has_rtl_chars)
- WrapStringWithLTRFormatting(text);
- else
- WrapStringWithRTLFormatting(text);
-
- return true;
-}
-
-bool UnadjustStringForLocaleDirection(string16* text) {
- if (!IsRTL() || text->empty())
- return false;
-
- *text = StripWrappingBidiControlCharacters(*text);
- return true;
-}
-#else
bool AdjustStringForLocaleDirection(string16* text) {
// On OS X & GTK the directionality of a label is determined by the first
// strongly directional character.
@@ -298,8 +274,6 @@ bool UnadjustStringForLocaleDirection(string16* text) {
return true;
}
-#endif // !OS_WIN
-
bool StringContainsStrongRTLChars(const string16& text) {
const UChar* string = text.c_str();
size_t length = text.length();
@@ -353,8 +327,6 @@ void WrapPathWithLTRFormatting(const FilePath& path,
rtl_safe_path->push_back(kLeftToRightEmbeddingMark);
#if defined(OS_MACOSX)
rtl_safe_path->append(UTF8ToUTF16(path.value()));
-#elif defined(OS_WIN)
- rtl_safe_path->append(path.value());
#else // defined(OS_POSIX) && !defined(OS_MACOSX)
std::wstring wide_path = base::SysNativeMBToWide(path.value());
rtl_safe_path->append(WideToUTF16(wide_path));
« no previous file with comments | « base/i18n/icu_util_nacl_win64.cc ('k') | base/json/json_file_value_serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698