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

Unified Diff: chrome/browser/bookmarks/bookmark_table_model.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 | « chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc ('k') | chrome/browser/browser_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/bookmarks/bookmark_table_model.cc
===================================================================
--- chrome/browser/bookmarks/bookmark_table_model.cc (revision 42180)
+++ chrome/browser/bookmarks/bookmark_table_model.cc (working copy)
@@ -9,6 +9,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "app/table_model_observer.h"
+#include "base/i18n/rtl.h"
#include "base/i18n/time_formatting.h"
#include "base/string_util.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
@@ -314,7 +315,7 @@
// TODO(xji): Consider adding a special case if the title text is a URL,
// since those should always be displayed LTR. Please refer to
// http://crbug.com/6726 for more information.
- l10n_util::AdjustStringForLocaleDirection(title, &title);
+ base::i18n::AdjustStringForLocaleDirection(title, &title);
return title;
}
@@ -326,8 +327,8 @@
: std::wstring();
std::wstring url_text = net::FormatUrl(node->GetURL(), languages, false,
UnescapeRule::SPACES, NULL, NULL, NULL);
- if (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT)
- l10n_util::WrapStringWithLTRFormatting(&url_text);
+ if (base::i18n::IsRTL())
+ base::i18n::WrapStringWithLTRFormatting(&url_text);
return url_text;
}
@@ -353,8 +354,8 @@
// Firefox, IE, Nautilus, gedit choose to format only the whole path as
// LTR too. The point here is to display the path the same way as it's
// displayed by other software.
- if (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT)
- l10n_util::WrapStringWithLTRFormatting(&path);
+ if (base::i18n::IsRTL())
+ base::i18n::WrapStringWithLTRFormatting(&path);
return path;
}
}
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc ('k') | chrome/browser/browser_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698