| Index: chrome/common/child_process_info.cc
|
| diff --git a/chrome/common/child_process_info.cc b/chrome/common/child_process_info.cc
|
| index 87745787fa50f2047cfc4296ba055dcd3fe4f13f..fd2e9fd7f33b3050a8c05fd594d4ded20d71499f 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_),
|
| + renderer_type_(original.renderer_type_),
|
| name_(original.name_),
|
| version_(original.version_),
|
| id_(original.id_),
|
| @@ -31,6 +32,7 @@ ChildProcessInfo& ChildProcessInfo::operator=(
|
| const ChildProcessInfo& original) {
|
| if (&original != this) {
|
| type_ = original.type_;
|
| + renderer_type_ = original.renderer_type_;
|
| name_ = original.name_;
|
| version_ = original.version_;
|
| id_ = original.id_;
|
| @@ -39,6 +41,7 @@ ChildProcessInfo& ChildProcessInfo::operator=(
|
| return *this;
|
| }
|
|
|
| +// static
|
| std::string ChildProcessInfo::GetTypeNameInEnglish(
|
| ChildProcessInfo::ProcessType type) {
|
| switch (type) {
|
| @@ -73,6 +76,33 @@ std::string ChildProcessInfo::GetTypeNameInEnglish(
|
| }
|
| }
|
|
|
| +// static
|
| +std::string ChildProcessInfo::GetRendererTypeNameInEnglish(
|
| + ChildProcessInfo::RendererProcessType type) {
|
| + switch (type) {
|
| + case RENDERER_NORMAL:
|
| + return "Tab";
|
| + case RENDERER_CHROME:
|
| + return "Tab (Chrome)";
|
| + case RENDERER_EXTENSION:
|
| + return "Extension";
|
| + case RENDERER_UNKNOWN:
|
| + default:
|
| + NOTREACHED() << "Unknown renderer process type!";
|
| + return "Unknown";
|
| + }
|
| +}
|
| +
|
| +// static
|
| +std::string ChildProcessInfo::GetFullTypeNameInEnglish(
|
| + ChildProcessInfo::ProcessType type,
|
| + ChildProcessInfo::RendererProcessType rtype) {
|
| + if (type == RENDER_PROCESS)
|
| + return GetRendererTypeNameInEnglish(rtype);
|
| + return GetTypeNameInEnglish(type);
|
| +}
|
| +
|
| +
|
| string16 ChildProcessInfo::GetLocalizedTitle() const {
|
| string16 title = WideToUTF16Hack(name_);
|
| if (type_ == ChildProcessInfo::PLUGIN_PROCESS && title.empty())
|
| @@ -125,6 +155,7 @@ string16 ChildProcessInfo::GetLocalizedTitle() const {
|
| }
|
|
|
| ChildProcessInfo::ChildProcessInfo(ProcessType type, int id) : type_(type) {
|
| + renderer_type_ = RENDERER_UNKNOWN;
|
| if (id == -1)
|
| id_ = GenerateChildProcessUniqueId();
|
| else
|
|
|