Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1405)

Unified Diff: chrome/app/chrome_main_delegate.cc

Issue 45253002: Do not use set process names in the Activity Monitor, using Process Manager functions in the proces… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: grd fix Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/mac/mac_util.mm ('k') | chrome/app/chromium_strings.grd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/chrome_main_delegate.cc
diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc
index ae7cdaa704a33eb39ad6439441feb44532e00746..c9ff84444f1c70fedcb79f12e922674057c39797 100644
--- a/chrome/app/chrome_main_delegate.cc
+++ b/chrome/app/chrome_main_delegate.cc
@@ -252,32 +252,6 @@ bool SubprocessNeedsResourceBundle(const std::string& process_type) {
process_type == switches::kUtilityProcess;
}
-#if defined(OS_MACOSX)
-// Update the name shown in Activity Monitor so users are less likely to ask
-// why Chrome has so many processes.
-void SetMacProcessName(const CommandLine& command_line) {
- std::string process_type =
- command_line.GetSwitchValueASCII(switches::kProcessType);
- // Don't worry about the browser process, its gets the stock name.
- int name_id = 0;
- if (command_line.HasSwitch(switches::kExtensionProcess)) {
- name_id = IDS_WORKER_APP_NAME;
- } else if (process_type == switches::kRendererProcess) {
- name_id = IDS_RENDERER_APP_NAME;
- } else if (process_type == switches::kPluginProcess ||
- process_type == switches::kPpapiPluginProcess) {
- name_id = IDS_PLUGIN_APP_NAME;
- } else if (process_type == switches::kUtilityProcess) {
- name_id = IDS_UTILITY_APP_NAME;
- }
- if (name_id) {
- NSString* app_name = l10n_util::GetNSString(name_id);
- base::mac::SetProcessName(base::mac::NSToCFCast(app_name));
- }
-}
-
-#endif // defined(OS_MACOSX)
-
#if defined(OS_POSIX)
// Check for --version and --product-version; return true if we encountered
// one of these switches and should exit now.
@@ -721,12 +695,6 @@ void ChromeMainDelegate::PreSandboxStartup() {
CHECK(!loaded_locale.empty()) << "Locale could not be found for " <<
locale;
-#if defined(OS_MACOSX)
- // Update the process name (need resources to get the strings, so
- // only do this when ResourcesBundle has been initialized).
- SetMacProcessName(command_line);
-#endif // defined(OS_MACOSX)
-
#if !defined(CHROME_MULTIPLE_DLL_BROWSER)
if (process_type == switches::kUtilityProcess)
chrome::ChromeContentUtilityClient::PreSandboxStartup();
« no previous file with comments | « base/mac/mac_util.mm ('k') | chrome/app/chromium_strings.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698