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_piece.h" | |
25 #include "base/string_util.h" | 24 #include "base/string_util.h" |
26 #include "base/sys_string_conversions.h" | 25 #include "base/sys_string_conversions.h" |
| 26 #include "base/utf_string_conversions.h" |
27 | 27 |
28 #if defined(OS_LINUX) | 28 #if defined(OS_LINUX) |
29 // Linux/glibc doesn't natively have setproctitle(). | 29 // Linux/glibc doesn't natively have setproctitle(). |
30 #include "base/setproctitle_linux.h" | 30 #include "base/setproctitle_linux.h" |
31 #endif | 31 #endif |
32 | 32 |
33 CommandLine* CommandLine::current_process_commandline_ = NULL; | 33 CommandLine* CommandLine::current_process_commandline_ = NULL; |
34 | 34 |
35 // Since we use a lazy match, make sure that longer versions (like L"--") | 35 // Since we use a lazy match, make sure that longer versions (like L"--") |
36 // are listed before shorter versions (like L"-") of similar prefixes. | 36 // are listed before shorter versions (like L"-") of similar prefixes. |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 #endif | 471 #endif |
472 | 472 |
473 void CommandLine::AppendSwitchWithValue(const std::string& switch_string, | 473 void CommandLine::AppendSwitchWithValue(const std::string& switch_string, |
474 const std::string& value_string) { | 474 const std::string& value_string) { |
475 AppendSwitchWithValue(switch_string, ASCIIToWide(value_string)); | 475 AppendSwitchWithValue(switch_string, ASCIIToWide(value_string)); |
476 } | 476 } |
477 | 477 |
478 // private | 478 // private |
479 CommandLine::CommandLine() { | 479 CommandLine::CommandLine() { |
480 } | 480 } |
OLD | NEW |