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

Unified Diff: content/common/set_process_title.cc

Issue 11225045: Move a bunch of content\common code into the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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 | « content/common/set_process_title.h ('k') | content/common/set_process_title_linux.h » ('j') | 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 163359)
+++ content/common/set_process_title.cc (working copy)
@@ -23,24 +23,26 @@
#include "base/file_util.h"
#include "base/process_util.h"
#include "base/string_util.h"
-// Linux/glibc doesn't natively have setproctitle().
+// Linux/glibc doesn't natively have SetProcTitle().
#include "content/common/set_process_title_linux.h"
#endif // defined(OS_LINUX)
-// TODO(jrg): Find out if setproctitle or equivalent is available on Android.
+namespace content {
+
+// TODO(jrg): Find out if SetProcTitle or equivalent is available on Android.
#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_SOLARIS) && \
!defined(OS_ANDROID)
void SetProcessTitleFromCommandLine(const char** main_argv) {
// Build a single string which consists of all the arguments separated
// by spaces. We can't actually keep them separate due to the way the
- // setproctitle() function works.
+ // SetProcTitle() function works.
std::string title;
bool have_argv0 = false;
#if defined(OS_LINUX)
if (main_argv)
- setproctitle_init(main_argv);
+ SetProcTitleInit(main_argv);
// In Linux we sometimes exec ourselves from /proc/self/exe, but this makes us
// show up as "exe" in process listings. Read the symlink /proc/self/exe and
@@ -73,7 +75,7 @@
title += command_line->argv()[i];
}
// Disable prepending argv[0] with '-' if we prepended it ourselves above.
- setproctitle(have_argv0 ? "-%s" : "%s", title.c_str());
+ SetProcTitle(have_argv0 ? "-%s" : "%s", title.c_str());
scottmg 2012/10/22 23:42:19 this rename will break on other posix != linux? no
}
#else
@@ -84,3 +86,5 @@
}
#endif
+
+} // namespace content
« no previous file with comments | « content/common/set_process_title.h ('k') | content/common/set_process_title_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698