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

Unified Diff: chrome/browser/download/download_util.cc

Issue 3108027: Convert GetDisplayStringInLTRDirectionality from wstring to string16. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 4 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
Index: chrome/browser/download/download_util.cc
diff --git a/chrome/browser/download/download_util.cc b/chrome/browser/download/download_util.cc
index f61ac4c78f09a0ef786396512c5bf497cfd3e69f..e76bf6ebf83ccde0d8a49cbd8245cd58f0e0e662 100644
--- a/chrome/browser/download/download_util.cc
+++ b/chrome/browser/download/download_util.cc
@@ -548,9 +548,10 @@ DictionaryValue* CreateDownloadItemValue(DownloadItem* download, int id) {
file_value->SetString("file_path",
WideToUTF16Hack(download->full_path().ToWStringHack()));
// Keep file names as LTR.
- std::wstring file_name = download->GetFileName().ToWStringHack();
- base::i18n::GetDisplayStringInLTRDirectionality(&file_name);
- file_value->SetString("file_name", WideToUTF16Hack(file_name));
+ string16 file_name = WideToUTF16Hack(
+ download->GetFileName().ToWStringHack());
+ file_name = base::i18n::GetDisplayStringInLTRDirectionality(file_name);
+ file_value->SetString("file_name", file_name);
file_value->SetString("url", download->url().spec());
file_value->SetBoolean("otr", download->is_otr());

Powered by Google App Engine
This is Rietveld 408576698