Browse Source

Stop setting helper process names on OS X

See https://codereview.chromium.org/45253002.
Adam Roben 11 years ago
parent
commit
9c5b81bf7a

+ 0 - 1
brightray/common/main_delegate.cc

@@ -34,7 +34,6 @@ void MainDelegate::PreSandboxStartup() {
 #if defined(OS_MACOSX)
   OverrideChildProcessPath();
   OverrideFrameworkBundlePath();
-  SetProcessName();
 #endif
   InitializeResourceBundle();
 }

+ 0 - 1
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<ContentClient> content_client_;

+ 0 - 18
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));
-}
-
 }