OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "build/build_config.h" | 7 #include "build/build_config.h" |
8 | 8 |
9 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_SOLARIS) | 9 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_SOLARIS) |
10 #include <limits.h> | 10 #include <limits.h> |
11 #include <stdlib.h> | 11 #include <stdlib.h> |
12 #include <unistd.h> | 12 #include <unistd.h> |
13 | 13 |
14 #include <string> | 14 #include <string> |
15 | 15 |
16 #include "base/command_line.h" | 16 #include "base/command_line.h" |
17 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_SOLARIS) | 17 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_SOLARIS) |
18 | 18 |
19 #if defined(OS_LINUX) | 19 #if defined(OS_LINUX) |
20 #include <sys/prctl.h> | 20 #include <sys/prctl.h> |
21 | 21 |
22 #include "base/file_util.h" | |
23 #include "base/files/file_path.h" | 22 #include "base/files/file_path.h" |
| 23 #include "base/files/file_util.h" |
24 #include "base/process/process_metrics.h" | 24 #include "base/process/process_metrics.h" |
25 #include "base/strings/string_util.h" | 25 #include "base/strings/string_util.h" |
26 #include "base/threading/platform_thread.h" | 26 #include "base/threading/platform_thread.h" |
27 // Linux/glibc doesn't natively have setproctitle(). | 27 // Linux/glibc doesn't natively have setproctitle(). |
28 #include "content/common/set_process_title_linux.h" | 28 #include "content/common/set_process_title_linux.h" |
29 #endif // defined(OS_LINUX) | 29 #endif // defined(OS_LINUX) |
30 | 30 |
31 namespace content { | 31 namespace content { |
32 | 32 |
33 // TODO(jrg): Find out if setproctitle or equivalent is available on Android. | 33 // TODO(jrg): Find out if setproctitle or equivalent is available on Android. |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 #else | 83 #else |
84 | 84 |
85 // All other systems (basically Windows & Mac) have no need or way to implement | 85 // All other systems (basically Windows & Mac) have no need or way to implement |
86 // this function. | 86 // this function. |
87 void SetProcessTitleFromCommandLine(const char** /* main_argv */) { | 87 void SetProcessTitleFromCommandLine(const char** /* main_argv */) { |
88 } | 88 } |
89 | 89 |
90 #endif | 90 #endif |
91 | 91 |
92 } // namespace content | 92 } // namespace content |
OLD | NEW |