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

Unified Diff: content/common/set_process_title_linux.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
Index: content/common/set_process_title_linux.cc
===================================================================
--- content/common/set_process_title_linux.cc (revision 163359)
+++ content/common/set_process_title_linux.cc (working copy)
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// This file implements BSD-style setproctitle() for Linux.
+// This file implements BSD-style SetProcTitle() for Linux.
// It is written such that it can easily be compiled outside Chromium.
//
// The Linux kernel sets up two locations in memory to pass arguments and
@@ -45,12 +45,14 @@
#include <string.h>
#include <unistd.h>
+namespace content {
+
extern char** environ;
static char** g_main_argv = NULL;
static char* g_orig_argv0 = NULL;
-void setproctitle(const char* fmt, ...) {
+void SetProcTitle(const char* fmt, ...) {
va_list ap;
size_t i, avail_size;
uintptr_t page_size, page, page_end;
@@ -103,7 +105,7 @@
// A version of this built into glibc would not need this function, since
// it could stash the argv pointer in __libc_start_main(). But we need it.
-void setproctitle_init(const char** main_argv) {
+void SetProcTitleInit(const char** main_argv) {
if (g_main_argv)
return;
@@ -113,3 +115,5 @@
if (((uintptr_t) environ) / page_size == ((uintptr_t) main_argv) / page_size)
g_main_argv = const_cast<char**>(main_argv);
}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698