Stop setting helper process names on OS X
See https://codereview.chromium.org/45253002.
This commit is contained in:
parent
ab8cb1e3a5
commit
9c5b81bf7a
3 changed files with 0 additions and 20 deletions
|
@ -34,7 +34,6 @@ void MainDelegate::PreSandboxStartup() {
|
|||
#if defined(OS_MACOSX)
|
||||
OverrideChildProcessPath();
|
||||
OverrideFrameworkBundlePath();
|
||||
SetProcessName();
|
||||
#endif
|
||||
InitializeResourceBundle();
|
||||
}
|
||||
|
|
|
@ -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_;
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue