OLD | NEW |
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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <shellapi.h> | 9 #include <shellapi.h> |
10 #elif defined(OS_POSIX) | 10 #elif defined(OS_POSIX) |
11 #include <limits.h> | 11 #include <limits.h> |
12 #include <stdlib.h> | 12 #include <stdlib.h> |
13 #include <unistd.h> | 13 #include <unistd.h> |
14 #endif | 14 #endif |
15 #if defined(OS_LINUX) | 15 #if defined(OS_LINUX) |
16 #include <sys/prctl.h> | 16 #include <sys/prctl.h> |
17 #endif | 17 #endif |
18 | 18 |
19 #include <algorithm> | 19 #include <algorithm> |
20 | 20 |
21 #include "base/file_path.h" | 21 #include "base/file_path.h" |
22 #include "base/logging.h" | 22 #include "base/logging.h" |
23 #include "base/singleton.h" | 23 #include "base/singleton.h" |
| 24 #include "base/string_split.h" |
24 #include "base/string_util.h" | 25 #include "base/string_util.h" |
25 #include "base/sys_string_conversions.h" | 26 #include "base/sys_string_conversions.h" |
26 #include "base/utf_string_conversions.h" | 27 #include "base/utf_string_conversions.h" |
27 | 28 |
28 #if defined(OS_LINUX) | 29 #if defined(OS_LINUX) |
29 // Linux/glibc doesn't natively have setproctitle(). | 30 // Linux/glibc doesn't natively have setproctitle(). |
30 #include "base/setproctitle_linux.h" | 31 #include "base/setproctitle_linux.h" |
31 #endif | 32 #endif |
32 | 33 |
33 CommandLine* CommandLine::current_process_commandline_ = NULL; | 34 CommandLine* CommandLine::current_process_commandline_ = NULL; |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 | 536 |
536 // private | 537 // private |
537 CommandLine::CommandLine() { | 538 CommandLine::CommandLine() { |
538 } | 539 } |
539 | 540 |
540 // static | 541 // static |
541 CommandLine* CommandLine::ForCurrentProcessMutable() { | 542 CommandLine* CommandLine::ForCurrentProcessMutable() { |
542 DCHECK(current_process_commandline_); | 543 DCHECK(current_process_commandline_); |
543 return current_process_commandline_; | 544 return current_process_commandline_; |
544 } | 545 } |
OLD | NEW |