From 9c5b81bf7ae749bb7f2e243ad6912f93daf3b8e6 Mon Sep 17 00:00:00 2001 From: Adam Roben Date: Mon, 2 Dec 2013 11:40:43 -0500 Subject: [PATCH] Stop setting helper process names on OS X See https://codereview.chromium.org/45253002. --- brightray/common/main_delegate.cc | 1 - brightray/common/main_delegate.h | 1 - brightray/common/main_delegate_mac.mm | 18 ------------------ 3 files changed, 20 deletions(-) diff --git a/brightray/common/main_delegate.cc b/brightray/common/main_delegate.cc index 4c903149d09b..a5ecc5f45986 100644 --- a/brightray/common/main_delegate.cc +++ b/brightray/common/main_delegate.cc @@ -34,7 +34,6 @@ void MainDelegate::PreSandboxStartup() { #if defined(OS_MACOSX) OverrideChildProcessPath(); OverrideFrameworkBundlePath(); - SetProcessName(); #endif InitializeResourceBundle(); } diff --git a/brightray/common/main_delegate.h b/brightray/common/main_delegate.h index e1d033312c9e..5850f9593b28 100644 --- a/brightray/common/main_delegate.h +++ b/brightray/common/main_delegate.h @@ -42,7 +42,6 @@ class MainDelegate : public content::ContentMainDelegate { static base::FilePath GetResourcesPakFilePath(); static void OverrideChildProcessPath(); static void OverrideFrameworkBundlePath(); - static void SetProcessName(); #endif scoped_ptr content_client_; diff --git a/brightray/common/main_delegate_mac.mm b/brightray/common/main_delegate_mac.mm index 7c5aaf68da7c..c710fa1da21d 100644 --- a/brightray/common/main_delegate_mac.mm +++ b/brightray/common/main_delegate_mac.mm @@ -11,7 +11,6 @@ #include "base/command_line.h" #include "base/mac/bundle_locations.h" -#include "base/mac/mac_util.h" #include "base/path_service.h" #include "base/strings/stringprintf.h" #include "base/strings/sys_string_conversions.h" @@ -48,21 +47,4 @@ void MainDelegate::OverrideChildProcessPath() { PathService::Override(content::CHILD_PROCESS_EXE, helper_path); } -void MainDelegate::SetProcessName() { - const auto& command_line = *CommandLine::ForCurrentProcess(); - auto process_type = command_line.GetSwitchValueASCII(switches::kProcessType); - std::string suffix; - if (process_type == switches::kRendererProcess) - suffix = "Renderer"; - else if (process_type == switches::kPluginProcess || process_type == switches::kPpapiPluginProcess) - suffix = "Plug-In Host"; - else if (process_type == switches::kUtilityProcess) - suffix = "Utility"; - else - return; - - auto name = base::SysUTF8ToNSString(base::StringPrintf("%s %s", GetApplicationName().c_str(), suffix.c_str())); - base::mac::SetProcessName(base::mac::NSToCFCast(name)); -} - }