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

Side by Side Diff: content/common/set_process_title.cc

Issue 7238021: Solaris patch (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/common/set_process_title.h" 5 #include "content/common/set_process_title.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
11 #include "build/build_config.h" 11 #include "build/build_config.h"
12 12
13 #if defined(OS_POSIX) 13 #if defined(OS_POSIX)
14 #include <limits.h> 14 #include <limits.h>
15 #include <stdlib.h> 15 #include <stdlib.h>
16 #include <unistd.h> 16 #include <unistd.h>
17 #endif 17 #endif
18 18
19 #if defined(OS_LINUX) 19 #if defined(OS_LINUX)
20 #include <sys/prctl.h> 20 #include <sys/prctl.h>
21 #endif
21 22
23 #if defined(OS_LINUX) || defined(OS_SOLARIS)
22 // Linux/glibc doesn't natively have setproctitle(). 24 // Linux/glibc doesn't natively have setproctitle().
23 #include "content/common/set_process_title_linux.h" 25 #include "content/common/set_process_title_linux.h"
Evan Martin 2011/06/24 17:51:18 Does this code work on Solaris? I'd be surprised
24 #endif 26 #endif
25 27
26 #if defined(OS_POSIX) && !defined(OS_MACOSX) 28 #if defined(OS_POSIX) && !defined(OS_MACOSX)
27 29
28 void SetProcessTitleFromCommandLine(char** main_argv) { 30 void SetProcessTitleFromCommandLine(char** main_argv) {
29 // Build a single string which consists of all the arguments separated 31 // Build a single string which consists of all the arguments separated
30 // by spaces. We can't actually keep them separate due to the way the 32 // by spaces. We can't actually keep them separate due to the way the
31 // setproctitle() function works. 33 // setproctitle() function works.
32 std::string title; 34 std::string title;
33 bool have_argv0 = false; 35 bool have_argv0 = false;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 74
73 #else 75 #else
74 76
75 // All other systems (basically Windows & Mac) have no need or way to implement 77 // All other systems (basically Windows & Mac) have no need or way to implement
76 // this function. 78 // this function.
77 void SetProcessTitleFromCommandLine(char** /* main_argv */) { 79 void SetProcessTitleFromCommandLine(char** /* main_argv */) {
78 } 80 }
79 81
80 #endif 82 #endif
81 83
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698