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

Unified Diff: app/text_elider.cc

Issue 1073005: Move RTL related functions from app/l10n_util to base/i18n/rtl... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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
« no previous file with comments | « app/text_elider.h ('k') | app/text_elider_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/text_elider.cc
===================================================================
--- app/text_elider.cc (revision 42180)
+++ app/text_elider.cc (working copy)
@@ -8,6 +8,7 @@
#include "app/text_elider.h"
#include "app/l10n_util.h"
#include "base/file_path.h"
+#include "base/i18n/rtl.h"
#include "base/string_util.h"
#include "base/sys_string_conversions.h"
#include "base/utf_string_conversions.h"
@@ -263,7 +264,7 @@
int full_width = font.GetStringWidth(filename.ToWStringHack());
if (full_width <= available_pixel_width) {
std::wstring elided_name = filename.ToWStringHack();
- return l10n_util::GetDisplayStringInLTRDirectionality(&elided_name);
+ return base::i18n::GetDisplayStringInLTRDirectionality(&elided_name);
}
#if defined(OS_WIN)
@@ -277,7 +278,7 @@
if (rootname.empty() || extension.empty()) {
std::wstring elided_name = ElideText(filename.ToWStringHack(), font,
available_pixel_width);
- return l10n_util::GetDisplayStringInLTRDirectionality(&elided_name);
+ return base::i18n::GetDisplayStringInLTRDirectionality(&elided_name);
}
int ext_width = font.GetStringWidth(extension);
@@ -286,13 +287,13 @@
// We may have trimmed the path.
if (root_width + ext_width <= available_pixel_width) {
std::wstring elided_name = rootname + extension;
- return l10n_util::GetDisplayStringInLTRDirectionality(&elided_name);
+ return base::i18n::GetDisplayStringInLTRDirectionality(&elided_name);
}
int available_root_width = available_pixel_width - ext_width;
std::wstring elided_name = ElideText(rootname, font, available_root_width);
elided_name += extension;
- return l10n_util::GetDisplayStringInLTRDirectionality(&elided_name);
+ return base::i18n::GetDisplayStringInLTRDirectionality(&elided_name);
}
// This function adds an ellipsis at the end of the text if the text
« no previous file with comments | « app/text_elider.h ('k') | app/text_elider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698