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

Unified Diff: content/common/set_process_title.cc

Issue 8598004: Linux: Fix bad #define for SetProcessTitleFromCommandLine(). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/set_process_title.cc
===================================================================
--- content/common/set_process_title.cc (revision 110586)
+++ content/common/set_process_title.cc (working copy)
@@ -4,27 +4,29 @@
#include "content/common/set_process_title.h"
-#include "base/command_line.h"
-#include "base/file_path.h"
-#include "base/file_util.h"
-#include "base/string_util.h"
#include "build/build_config.h"
-#if defined(OS_POSIX)
+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_SOLARIS)
#include <limits.h>
#include <stdlib.h>
#include <unistd.h>
-#endif
+#include <string>
+
+#include "base/command_line.h"
+#endif // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_SOLARIS)
+
#if defined(OS_LINUX)
#include <sys/prctl.h>
+#include "base/file_path.h"
+#include "base/file_util.h"
+#include "base/string_util.h"
// Linux/glibc doesn't natively have setproctitle().
#include "content/common/set_process_title_linux.h"
-#endif
+#endif // defined(OS_LINUX)
-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_SOLARIS) && \
- defined(OS_OPENBSD)
+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_SOLARIS)
void SetProcessTitleFromCommandLine(const char** main_argv) {
// Build a single string which consists of all the arguments separated
@@ -57,9 +59,9 @@
// available, this lets us set the short process name that shows when the
// full command line is not being displayed in most process listings.
prctl(PR_SET_NAME, FilePath(title).BaseName().value().c_str());
-#endif
+#endif // defined(PR_SET_NAME)
}
-#endif
+#endif // defined(OS_LINUX)
const CommandLine* command_line = CommandLine::ForCurrentProcess();
for (size_t i = 1; i < command_line->argv().size(); ++i) {
@@ -79,4 +81,3 @@
}
#endif
-
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698