diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-20 06:37:01 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-20 06:37:01 +0000 |
commit | 7cf1b6ced3b14cce1d66ca0ddc713851f0d37536 (patch) | |
tree | 1c2fc9f4d52bf3046addf820d5eec03a2e150749 /chrome/browser/possible_url_model.cc | |
parent | f9f4841b14a9f309ce5ee613f0d4de6afad88767 (diff) | |
download | chromium_src-7cf1b6ced3b14cce1d66ca0ddc713851f0d37536.zip chromium_src-7cf1b6ced3b14cce1d66ca0ddc713851f0d37536.tar.gz chromium_src-7cf1b6ced3b14cce1d66ca0ddc713851f0d37536.tar.bz2 |
Move RTL related functions from app/l10n_util to base/i18n/rtl
TBR=darin
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/1073005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42182 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/possible_url_model.cc')
-rw-r--r-- | chrome/browser/possible_url_model.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/possible_url_model.cc b/chrome/browser/possible_url_model.cc index a8bc57b..2f4fdc8 100644 --- a/chrome/browser/possible_url_model.cc +++ b/chrome/browser/possible_url_model.cc @@ -8,6 +8,7 @@ #include "app/resource_bundle.h" #include "app/table_model_observer.h" #include "base/callback.h" +#include "base/i18n/rtl.h" #include "base/utf_string_conversions.h" #include "chrome/browser/cancelable_request.h" #include "chrome/browser/favicon_service.h" @@ -113,7 +114,7 @@ std::wstring PossibleURLModel::GetText(int row, int col_id) { // since those should always have LTR directionality. Please refer to // http://crbug.com/6726 for more information. std::wstring localized_title; - if (l10n_util::AdjustStringForLocaleDirection(title, &localized_title)) + if (base::i18n::AdjustStringForLocaleDirection(title, &localized_title)) return localized_title; return title; } @@ -121,11 +122,11 @@ std::wstring PossibleURLModel::GetText(int row, int col_id) { // TODO(brettw): this should probably pass the GURL up so the URL elider // can be used at a higher level when we know the width. const string16& url = results_[row].display_url.display_url(); - if (l10n_util::GetTextDirection() == l10n_util::LEFT_TO_RIGHT) + if (!base::i18n::IsRTL()) return UTF16ToWideHack(url); // Force URL to be LTR. std::wstring localized_url = UTF16ToWideHack(url); - l10n_util::WrapStringWithLTRFormatting(&localized_url); + base::i18n::WrapStringWithLTRFormatting(&localized_url); return localized_url; } |