summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-05 01:39:56 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-05 01:39:56 +0000
commit4a4afe389baae7c715da981aff490dda7f58f7a9 (patch)
tree737eaf351bac891f35342676ddbcf2ed256b69d8 /chrome/browser/download
parentf5fb4d4bc5bc2477eb3d7aadd13bd5c487b79559 (diff)
downloadchromium_src-4a4afe389baae7c715da981aff490dda7f58f7a9.zip
chromium_src-4a4afe389baae7c715da981aff490dda7f58f7a9.tar.gz
chromium_src-4a4afe389baae7c715da981aff490dda7f58f7a9.tar.bz2
Use GetDisplayStringInLTRDirectionality() in more places to simplify code.
BUG=none TEST=none Review URL: http://codereview.chromium.org/1928004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46427 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download')
-rw-r--r--chrome/browser/download/download_item_model.cc5
-rw-r--r--chrome/browser/download/download_util.cc5
2 files changed, 4 insertions, 6 deletions
diff --git a/chrome/browser/download/download_item_model.cc b/chrome/browser/download/download_item_model.cc
index b69d85f..2dc4c1e 100644
--- a/chrome/browser/download/download_item_model.cc
+++ b/chrome/browser/download/download_item_model.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -39,8 +39,7 @@ std::wstring DownloadItemModel::GetStatusText() {
// we mark the total string as an LTR string if the UI layout is
// right-to-left so that the string "456 MB" is treated as an LTR run.
std::wstring simple_total = FormatBytes(total, amount_units, true);
- if (base::i18n::IsRTL())
- base::i18n::WrapStringWithLTRFormatting(&simple_total);
+ base::i18n::GetDisplayStringInLTRDirectionality(&simple_total);
TimeDelta remaining;
std::wstring simple_time;
diff --git a/chrome/browser/download/download_util.cc b/chrome/browser/download/download_util.cc
index 720d203..0972ddc 100644
--- a/chrome/browser/download/download_util.cc
+++ b/chrome/browser/download/download_util.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
@@ -367,8 +367,7 @@ DictionaryValue* CreateDownloadItemValue(DownloadItem* download, int id) {
file_value->SetString(L"file_path", download->full_path().ToWStringHack());
// Keep file names as LTR.
std::wstring file_name = download->GetFileName().ToWStringHack();
- if (base::i18n::IsRTL())
- base::i18n::WrapStringWithLTRFormatting(&file_name);
+ base::i18n::GetDisplayStringInLTRDirectionality(&file_name);
file_value->SetString(L"file_name", file_name);
file_value->SetString(L"url", download->url().spec());
file_value->SetBoolean(L"otr", download->is_otr());