Index: chrome/browser/task_manager/task_manager_resource_providers.cc |
=================================================================== |
--- chrome/browser/task_manager/task_manager_resource_providers.cc (revision 70280) |
+++ chrome/browser/task_manager/task_manager_resource_providers.cc (working copy) |
@@ -171,11 +171,12 @@ |
std::wstring TaskManagerTabContentsResource::GetTitle() const { |
// Fall back on the URL if there's no title. |
- string16 tab_title = tab_contents_->GetTitle(); |
+ std::wstring tab_title(UTF16ToWideHack(tab_contents_->GetTitle())); |
if (tab_title.empty()) { |
- tab_title = UTF8ToUTF16(tab_contents_->GetURL().spec()); |
+ tab_title = UTF8ToWide(tab_contents_->GetURL().spec()); |
// Force URL to be LTR. |
- tab_title = base::i18n::GetDisplayStringInLTRDirectionality(tab_title); |
+ tab_title = UTF16ToWide(base::i18n::GetDisplayStringInLTRDirectionality( |
+ WideToUTF16(tab_title))); |
} else { |
// Since the tab_title will be concatenated with |
// IDS_TASK_MANAGER_TAB_PREFIX, we need to explicitly set the tab_title to |
@@ -195,7 +196,7 @@ |
extensions_service->IsInstalledApp(tab_contents_->GetURL()), |
tab_contents_->HostsExtension(), |
tab_contents_->profile()->IsOffTheRecord()); |
- return UTF16ToWideHack(l10n_util::GetStringFUTF16(message_id, tab_title)); |
+ return l10n_util::GetStringF(message_id, tab_title); |
} |
SkBitmap TaskManagerTabContentsResource::GetIcon() const { |
@@ -414,16 +415,15 @@ |
} |
std::wstring TaskManagerBackgroundContentsResource::GetTitle() const { |
- string16 title = WideToUTF16Hack(application_name_); |
+ std::wstring title = application_name_; |
if (title.empty()) { |
// No title (can't locate the parent app for some reason) so just display |
// the URL (properly forced to be LTR). |
- title = base::i18n::GetDisplayStringInLTRDirectionality( |
- UTF8ToUTF16(background_contents_->GetURL().spec())); |
+ title = UTF16ToWide(base::i18n::GetDisplayStringInLTRDirectionality( |
+ UTF8ToUTF16(background_contents_->GetURL().spec()))); |
} |
- return UTF16ToWideHack( |
- l10n_util::GetStringFUTF16(IDS_TASK_MANAGER_BACKGROUND_PREFIX, title)); |
+ return l10n_util::GetStringF(IDS_TASK_MANAGER_BACKGROUND_PREFIX, title); |
} |
@@ -881,13 +881,12 @@ |
} |
process_handle_ = extension_host_->render_process_host()->GetHandle(); |
pid_ = base::GetProcId(process_handle_); |
- string16 extension_name = UTF8ToUTF16(GetExtension()->name()); |
+ std::wstring extension_name(UTF8ToWide(GetExtension()->name())); |
DCHECK(!extension_name.empty()); |
int message_id = GetMessagePrefixID(GetExtension()->is_app(), true, |
extension_host_->profile()->IsOffTheRecord()); |
- title_ = UTF16ToWideHack(l10n_util::GetStringFUTF16(message_id, |
- extension_name)); |
+ title_ = l10n_util::GetStringF(message_id, extension_name); |
} |
TaskManagerExtensionProcessResource::~TaskManagerExtensionProcessResource() { |
@@ -1264,8 +1263,7 @@ |
// TaskManagerResource methods: |
std::wstring TaskManagerBrowserProcessResource::GetTitle() const { |
if (title_.empty()) { |
- title_ = UTF16ToWideHack( |
- l10n_util::GetStringUTF16(IDS_TASK_MANAGER_WEB_BROWSER_CELL_TEXT)); |
+ title_ = l10n_util::GetString(IDS_TASK_MANAGER_WEB_BROWSER_CELL_TEXT); |
} |
return title_; |
} |