diff options
author | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-21 22:27:35 +0000 |
---|---|---|
committer | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-21 22:27:35 +0000 |
commit | 7e3ceeb48be949d4313a49b530f1b6e730921dc4 (patch) | |
tree | 71da032540510c6256ff2ae99e9312401a92ed3d /chrome/common/child_process_info.cc | |
parent | db27d4e07ef150349afde9c541647a342e8edeb3 (diff) | |
download | chromium_src-7e3ceeb48be949d4313a49b530f1b6e730921dc4.zip chromium_src-7e3ceeb48be949d4313a49b530f1b6e730921dc4.tar.gz chromium_src-7e3ceeb48be949d4313a49b530f1b6e730921dc4.tar.bz2 |
Adds the plugin version on the title. This shows up
in task manager:
Before
title memory
================================================
|Plug-in: Shockwave Flash | XXXXX |
After
title memory
============================================
|Plug-in: Shockwave Flash (10,0,3,52) | XXXXX |
Some crazy plug-ins embed version string on the title so for those it shows twice. There are not many that fall into that category
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/2715001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50399 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/child_process_info.cc')
-rw-r--r-- | chrome/common/child_process_info.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/chrome/common/child_process_info.cc b/chrome/common/child_process_info.cc index dffa7e3..f08cb55 100644 --- a/chrome/common/child_process_info.cc +++ b/chrome/common/child_process_info.cc @@ -18,6 +18,7 @@ ChildProcessInfo::ChildProcessInfo(const ChildProcessInfo& original) : type_(original.type_), name_(original.name_), + version_(original.version_), id_(original.id_), process_(original.process_) { } @@ -30,6 +31,7 @@ ChildProcessInfo& ChildProcessInfo::operator=( if (&original != this) { type_ = original.type_; name_ = original.name_; + version_ = original.version_; id_ = original.id_; process_ = original.process_; } @@ -73,9 +75,16 @@ std::wstring ChildProcessInfo::GetLocalizedTitle() const { if (type_ == ChildProcessInfo::PLUGIN_PROCESS && title.empty()) title = l10n_util::GetString(IDS_TASK_MANAGER_UNKNOWN_PLUGIN_NAME); + // Explicitly mark name as LTR if there is no strong RTL character, + // to avoid the wrong concatenation result similar to "!Yahoo! Mail: the + // best web-based Email: NIGULP", in which "NIGULP" stands for the Hebrew + // or Arabic word for "plugin". + base::i18n::AdjustStringForLocaleDirection(title, &title); + int message_id; if (type_ == ChildProcessInfo::PLUGIN_PROCESS) { message_id = IDS_TASK_MANAGER_PLUGIN_PREFIX; + return l10n_util::GetStringF(message_id, title, version_.c_str()); } else if (type_ == ChildProcessInfo::WORKER_PROCESS) { message_id = IDS_TASK_MANAGER_WORKER_PREFIX; } else if (type_ == ChildProcessInfo::UTILITY_PROCESS) { @@ -91,11 +100,6 @@ std::wstring ChildProcessInfo::GetLocalizedTitle() const { return title; } - // Explicitly mark name as LTR if there is no strong RTL character, - // to avoid the wrong concatenation result similar to "!Yahoo! Mail: the - // best web-based Email: NIGULP", in which "NIGULP" stands for the Hebrew - // or Arabic word for "plugin". - base::i18n::AdjustStringForLocaleDirection(title, &title); return l10n_util::GetStringF(message_id, title); } |